If you look at the source waitUntilWidgetAppears just calls waitUntil and
encapsulates Timout exception into WidgetNotFoundException. This is most
likely because of existing API.
public void waitUntilWidgetAppears(ICondition waitForWidget) {
try {
waitUntil(waitForWidget);
} catch (TimeoutException e) {
throw new WidgetNotFoundException("Could not find widget.", e);
//$NON-NLS-1$
}
}
This was primarily to 'cast' the TimeoutException to a
WidgetNotFoundException.
I'm also considering changing this method to accept a
WaitForObjectCondition instead of an ICondition to make this distinction
clear. Also WaitForObjectCondition provides for better convenience apis.
-- Ketan
Ketan Patel wrote:
> If you look at the source waitUntilWidgetAppears just calls waitUntil
> and encapsulates Timout exception into WidgetNotFoundException. This is
> most likely because of existing API.
>
> public void waitUntilWidgetAppears(ICondition waitForWidget) {
> try {
> waitUntil(waitForWidget);
> } catch (TimeoutException e) {
> throw new WidgetNotFoundException("Could not find widget.",
> e); //$NON-NLS-1$
> }
> }
>