Oops, just ignore the previous post - I was running the test code from
the Display thread, therefore it all occurred sync instead of async -
which I didn't notice.
Michal
________________________________
From: Michal Dobisek
Sent: Friday, March 21, 2008 12:26 PM
To: 'swtbot-users@lists.sourceforge.net'
Subject: click() and Dialogs
Hi Ketan,
I am trying out SWTBot and I came across the following problem. My test
looks like this:
bot.menu("Command").menu("New...").click(); // Opens a dialog with
creation parameters
bot.shell("New...").activate(); // Activate the dialog
...
The problem is, that the click() method does not return until I leave
the dialog. The New... menu item launches command, whose handler simply
creates a dialog and then runs open() on it. Since the dialog is
blocking, it runs it's own event loop in it (see Window.open()) and
therefore does not return before the dialog is opened. Since the bot is
running this via asyncExec, it does not return either.
Did you already come across such a situation? Do you have any solution?
Thanks,
Michal
PS: I am running SWTBot from the current SVN trunk.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
SWTBot-users mailing list
SWTBot-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse