Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Strategy to have SWTBot test cases working accross different windowing systems
Strategy to have SWTBot test cases working accross different windowing systems [message #556592] Wed, 01 September 2010 23:03 Go to next message
Eclipse UserFriend
Originally posted by: manu_ny.optimum.net

Hi,

We have some SWTBot test cases that work well on MacOSX. Once deployed
on a testing machine which happens to be a linux machine with TWM window
manager, suddenly all our test cases fail because it seems that new
shell(s) do not get the focus or the activation they should. Is the only
way to get the test cases to work across different windowing systems is
to force some calls to SWTBot "activate" method? No chance that such
internals be encapsulated in the library?

On a side note, we get such exception from SWTBot:

org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundExcep tion: The w
idget was null.
at
org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.&lt ;init>(AbstractSWTBot.java:96)
at
org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl. <init>(AbstractSWTBotControl.java:47)
at
org.eclipse.swtbot.swt.finder.widgets.SWTBotShell.<in it>(SWTBotShell.java:49)
at
org.eclipse.swtbot.swt.finder.widgets.SWTBotShell.<in it>(SWTBotShell.java:38)
at
org.eclipse.swtbot.swt.finder.SWTBotFactory.activeShell(SWTB otFactory.java:341)
at
org.eclipse.swtbot.swt.finder.SWTBotFactory.menu(SWTBotFacto ry.java:208)
at
org.eclipse.swtbot.swt.finder.SWTBotFactory.menu(SWTBotFacto ry.java:198)

Would it be possible to add a bit more context to some of SWT
exceptions? The widget was null is rather limited. For instance, just
adding the name of the shell the system is trying to access would be a
big help for debugging.

Thanks.

Emmanuel.
Re: Strategy to have SWTBot test cases working accross different windowing systems [message #556756 is a reply to message #556592] Thu, 02 September 2010 13:37 Go to previous message
Pascal G is currently offline Pascal GFriend
Messages: 157
Registered: July 2009
Senior Member
On 10-09-01 07:03 PM, Gael Neymmeau wrote:
> Would it be possible to add a bit more context to some of SWT
> exceptions? The widget was null is rather limited. For instance, just
> adding the name of the shell the system is trying to access would be a
> big help for debugging.
>
> Thanks.
>
> Emmanuel.

There is. You only need to set-up log4j properly. There is a couple of
log4j.xml files across the repository which you could use as a start-off
point, but aside of that I can't really give you any other hints (I've
never activated it myself...)

Hope this helps
--
Pascal GĂ©linas | Software Developer
*Nu Echo Inc.*
http://www.nuecho.com/ | http://blog.nuecho.com/

*Because performance matters.*
Previous Topic:MultiPageEditor with Tabs(GEF Editor) and SWTBot
Next Topic:Issues with tree widget
Goto Forum:
  


Current Time: Fri Nov 28 00:41:04 GMT 2014

Powered by FUDForum. Page generated in 0.05488 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software