pause in my swtbot's test [message #26415] |
Thu, 05 March 2009 10:17  |
Eclipse User |
|
|
|
Hi list,
I read FAQ http://wiki.eclipse.org/SWTBot/FAQ.
I write the test below
public void testMenuFileNew() throws Exception {
bot.menu("File").click();
Thread.sleep(1000);
bot.menu("New").click();
Thread.sleep(1000);
}
The execution run good but I want to click on "File", stay one second,
after click on "New", wait another one second. But Test run so speed.
What I can do it?
Thanks in advance for your help.
|
|
|
|
|
|
|
|
Re: pause in my swtbot's test [message #26945 is a reply to message #26700] |
Sat, 07 March 2009 03:43  |
Eclipse User |
|
|
|
Thanks Ketan,
I went to my run configuration :
1- I choose Test runner: Junit3
2- I check "Keep JUnit after a test run when debugging"
I use eclipse 3.4 and SWTBot 2.0.
Now, when I execute my testCase below
public class FileTest extends TestCase {
public SWTEclipseBot bot;
public void setUp()throws Exception {
super.setUp();
bot = new SWTEclipseBot();
}
public void tearDown()throws Exception {
super.tearDown();
}
public void testMenuFileNew() throws Exception {
SWTBotMenu menuFile = bot.menu("File");
menuFile.click();
System.setProperty("org.eclipse.swtbot.search.timeout", "5000");
SWTBotMenu menuFileNew = menuFile.menu("New");
System.setProperty("org.eclipse.swtbot.search.timeout", "5000");
menuFileNew.click();
}
}
I don't have what I want.
I want to do this:
1- "swtbot" click on menu "File", wait 5 seconds
2- "swtbot" click on submenu "New" wait 5 seconds and so one...
I want to visualize any step of my test.
Thanks in advance for your help
|
|
|
Powered by
FUDForum. Page generated in 0.02906 seconds