More shells than expected [message #28442] |
Wed, 18 March 2009 13:05  |
Eclipse User |
|
|
|
Since a few weeks (or even longer) I get more shells than I expect.
I use bot.shells().lenght
Previously it returned 1 if there was no modal dialog. But now it returns
2 or even more, although there is no modal dialog visible.
I could not figure out what that "phantom" shell objects are on the GUI.
I always thought the main shell is the application itself which anyone can
see (is visible). And if there is a model dialog on top of that shell,
then there are 2 shells, but not more or less.
Did something change regarding that in SWTBot? Or have I to look at the
application under test if there something changed? Or any ideas why this
is?
|
|
|
|
|
|
|
|
|
|
Re: More shells than expected [message #29374 is a reply to message #29068] |
Thu, 19 March 2009 19:20  |
Eclipse User |
|
|
|
This might not work all the time but if your goal is to make sure your
application under test is accessible, I would try getting all the shells
descendant of your application, i.e. Shell.getShells() method. In SWTBot,
look at
org.eclipse.swtbot.swt.finder.waits.Conditions.waitForShell( Matcher <?>,
Shell); you should be able to pass in anything() matcher to get all the
shell.
Another idea is to try to force focus the application. If it fails, get
the active shell and close it if not what you looking for in a loop.
Hans Schwaebli wrote:
> What I try to achieve is to generically test whether there is a modal
> dialog in front of the application (for example warning or error dialog).
> Since after some actions I expect either a modal dialog to appear or no
> modal dialog to appear.
> I thought I can do this with display.shells().length, but it is not
> suitable for that purpose.
> Any idea how I can test this generically (independent of shell title etc.)?
|
|
|
Powered by
FUDForum. Page generated in 0.03528 seconds