On 30-Jun-08, at 2:20 PM, Hans Schwaebli wrote: > Widgets which are in background aren't found by SWTBot. > > This might be wanted for a particular test. But it could also be > wanted (for test stability reasons) that all widgets are found, no > matter if they are in background or if the application is minimized.
Finding invisible controls throws an exception because this is the natural way in which humans work, if I don't see it on the screen it does not exist. If you want to see the widget which is on another tab, etc. switch to the tab, make whatever assertions and switch back. There is an API in the Finder class that will enable you to find an invisible control if you want to. > It also would make debugging easier if the widgets are found when > the application is in background or minimized. Stepping through > would work without "WidgetNotFoundException" and you could use the > Display view to quickly test some statements like > bot.button("foo").click(); I do not see any way that you can run tests with the window minimized, which is why I've got logging all over the place as an alternative to debugging. > I admit that it would be nice to have and that this may not be your > priority as a one man SWT Bot army which you currently are. > > What do you think about this idea? I think it can work. I know it > from QF Test that this kind of automation worked for Swing > applications. The widgets didn't need to be in the foreground in > order to be controllable. Swing makes life much easier for developers and is designed very well with testability in mind. I wish I could say the same about SWT. Making SWT cross cross platform and having to depend on os events makes things very hard for testability. If you can think of a way to add this functionality in a way that does not break existing behavior, I'd be more than happy to incorporate it into SWTBot. -- 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