9 messages in net.sourceforge.lists.swtbot-usersRe: [SWTBot-users] Tests does not con...
FromSent OnAttachments
Hans SchwaebliJun 24, 2008 12:21 am 
Ketan PadegaonkarJun 24, 2008 12:39 am 
Hans SchwaebliJun 24, 2008 1:45 am 
Ketan PadegaonkarJun 24, 2008 1:55 am 
Hans SchwaebliJun 25, 2008 12:41 am 
Ketan PadegaonkarJun 25, 2008 12:47 am 
Hans SchwaebliJun 25, 2008 1:10 am 
Hans SchwaebliJun 27, 2008 12:58 am 
Ketan PadegaonkarJun 28, 2008 12:09 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [SWTBot-users] Tests does not continue after a lineActions...
From:Hans Schwaebli (hans@yahoo.com)
Date:Jun 27, 2008 12:58:09 am
List:net.sourceforge.lists.swtbot-users

Is there a way to avoid writing such an Eclipse plugin by using threads inside
the JUnit test?

I tried this in the test:

        final SWTBot bot = new SWTBot();

        Runnable r = new Runnable() {             public void run() {                 try                 {                     assertNotSame(bot.getDisplay().getThread(),
Thread.currentThread());                     bot.menu("File").click();                     bot.menu("Open Product Teardown...").click();                     bot.button("Open").click();                 }                 catch (Exception e)                 {                     throw new RuntimeException(e);                 }             }         };                 Thread t = new Thread(r);         t.start();

But it didn't work since it throws WidgetNotFoundException. The threads are not
the same, but it does not help in this approach. So I guess another condition
must be met which I don't know of right now.