|
|
Re: timing difficulties resolved by sleep -- is there a better way ? [message #39048 is a reply to message #39017] |
Tue, 16 June 2009 16:35 |
Ketan Padegaonkar Messages: 873 Registered: July 2009 |
Senior Member |
|
|
Using waitForCondition for improving robustness is the right way to do
UI tests, sleeps just make things too slow, not to mention unpredictable
and unreadable.
Also I'd be interested to know what kind of waits you're using and if
there are any particular waits that you'd like to share with others :)
--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr
On 16/6/09 21:49, Kay-Uwe Graw wrote:
> Apart from the fact, that there are still some issues with menu and
> contextmenu in SWTBot I would suggest using the ICondition interface and
> bot.waitUntil method. Using these you can write custom wait conditions
> which ensure that the previous operation has finished. Of course, you
> need to be able to identify in your application ui, when the previous
> operation has finished. For instance, I have a custom wait condition
> which waits that the text in the console view in the eclipse ide has a
> certain value to ensure that an ant task has finished. I generally use
> wait conditions quite a lot to make tests more robust, e.g. waiting
> explicitly for views and dialogs to appear or disappear, for widgets
> beeing disabled or enabled etc.
>
> Kay
>
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06026 seconds