Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBot has different behaviour depending if the window is top-most or not
SWTBot has different behaviour depending if the window is top-most or not [message #559347] Thu, 16 September 2010 08:57 Go to previous message
Gabriel Petrovay is currently offline Gabriel Petrovay
Messages: 42
Registered: July 2009
Member
Hi Ketan,

I have a test suite that when I start by hand from Eclipse runs successfully. But when I run it from a task (Windows' Task Scheduler) the some tests constantly fail.

One such problem is because the Window is not top-most when started from the Task Scheduler. To simplify this, this test also fails if you start it from Eclipse and you make another windows top-most such that the Eclipse SWTBot starts is not any more the top-most one.

The test fails because of the timeout waiting for a shell to be active:

bot.waitUntil(Conditions.shellIsActive("Errors in Workspace"));

But since the focus is on another window, the shell will never be active (having focus).

Consider that you have all these pop-ups in Eclipse like "Do you want to open the associated perspective?", "Save file", "Errors in Workspace", etc. that tou want to close. Do you know ways to work around this "sleep until active" condition? More precisely, to make the tests independent of whether the window is top most or not.

I can not control how the Eclipse application started (top-most or not). In my scenario Task Scheduler calls a batch script. This calls the ant batch script available in the eclipse/plugins/org.apache.ant.../bin. And this loads the tests.xml ant script that contains the target as described on the page http://wiki.eclipse.org/SWTBot/Ant#Ant .


Regards,
Gabriel
 
Read Message
Read Message
Read Message
Read Message
Previous Topic:Searching Trees
Next Topic:After click a MenuItem of a toolbarDropDownButton, the MenuItem is still displayed in the screen
Goto Forum:
  


Current Time: Sun May 19 11:03:42 EDT 2013

Powered by FUDForum. Page generated in 0.01742 seconds