waitUntil [message #473347] |
Wed, 05 August 2009 15:58  |
Eclipse User |
|
|
|
Hello,
I've got tests that I've made, but I'd just been using sleeps. I know I
should use waitUntil, or something like that to wait for dialogs or views
to show first.
I just don't fully understand what conditions I provide for the check.
If anyone could give me an example, say, to wait until the Welcome view is
displayed and active before closing it, that would help me out a lot.
Below is how I have my code, I'm just wondering what do I put in the place
of "condition"?
public void testCloseWelcome() {
try {
bot.waitUntil(condition);
bot.viewByTitle("Welcome").close();
} catch (WidgetNotFoundException e) {
fail("Welcome window not found.");
}
}
Thanks,
-Derek
|
|
|
|
|
|
Re: waitUntil [message #478750 is a reply to message #476341] |
Thu, 06 August 2009 12:47  |
Eclipse User |
|
|
|
Jay Norwood wrote:
> The SWTBotShell#activate() appears to have a built-in wait.
> bot.menu("Window").menu("Preferences").click();
> SWTBotShell prefsShell = bot.shell("Preferences");
> prefsShell.activate();
> or just
Shell. That's helpful. I'll try that out.
Thanks Jay :)
-Derek
|
|
|
Powered by
FUDForum. Page generated in 0.05141 seconds