On 24-Jun-08, at 12:52 PM, Hans Schwaebli wrote:

> I am writing code like this:
>
>         SWTBot bot = new SWTBot();
>         bot.menu("File").click();
>         bot.menu("Open Product Teardown...").click();
>         // Never returns from the above statement!
>         bot.button("Open").click();
>
> Unfortunately it does not execute the last statement since it is  
> stuck in the previous for some unknown reason. This is how it looks  
> like:
>
> http://img70.imageshack.us/img70/8823/imageiw0.gif
>
> I asked you about what relevance there is actually for starting RCP  
> tests as SWTBot Test. I am starting them as JUnit Plugin Test  
> because we need that for RCP 3.2 and the Plugin which adds "SWTBot  
> Test" to the start menu does not work on Eclipse 3.2. Mixing Eclipse  
> 3.3, RCP 3.2 and SWT Bot did not work. I need to be completely on 3.2.

SWTBot _has_ to run on the non-UI thread.

The reason that SWTBot is stuck on that particular dialog is that the  
open() method on org.eclipse.jface.window.Window() invokes  
#runEventLoop() which blocks the UI thread, and the tests cannot run  
any more.

This is _the only_ reason that SWTBot runs on a non-UI thread. Non  
blocking dialogs would have made life easier for SWTBot but  
unfortunately that's not the case.

The reason that you don't see the launch option is because the  
launcher uses internal API available on 3.3. If you can migrate  
net.sf.swtbot.eclipse.ui.JUnitLaunchConfigurationDelegate to 3.2 that  
would fix the issue for you.

-- Ketan


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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

Reply via email to