OK. I'll make some tests with SWTBot and would like to find a way to have the same scope of actions of a human end user. (not more, not less !) (except some restrictions about native windows).
Hans Schwaebli さんは書きました: > I am not sure if I understand you. > > I meant that SWTBot should not be able to control widgets which the > user cannot access. This depends of course on the situation. A control > is not all the time acessible to the user. But for SWTBot it is always > accessible and controlable. If a test writer is not careful, he can > implement actions which a user never could do and thus not test the UI > properly or get errors which a human user never would. > > Finding and controlling of widgets needs to be distinguished. Finding > every widget any time is not so critical in my eyes than controlling > every widget every time. If a window A is in front (modal) and the > user does something on it, then maybe something changes in the window > in the background, the tester wants to check if that has changed. So > he needs SWTBot to find the widget in order to test its properties. > But he should not be able to control it, for example click on an OKAY > button in the background because the human user never could do that, > since of the modal dialog in front. See? > > --- On *Tue, 7/8/08, Eddy POUSSIN /<[EMAIL PROTECTED]>/* wrote: > > Hello > Do you mean that if an application window WindowA is partially > hidden by another window in the foreground, SWTBot won't find > Window ; whereas an end-user only needs to click on the visible > part of WindowA? > Am I right about this limitation of SWTBot? > Thanks. > > > > Hans Schwaebli さんは書きました: >> Okay, I will look how that could be implemented when I am further >> into understanding SWT Bot and SWT. >> >> Let me just correct a small misunderstanding. I didn't mean >> widgets which are hidden in tabs or something like that, but only >> widgets which are "hidden" because the application window is in >> background or minimized. In my mind widgets which are hidden >> inside another tab should *not* be accessed directly (but there >> may be exceptions from that "rule", for example if one gains a >> lot of performance this way). >> >> >> >> --- On *Mon, 6/30/08, Ketan Padegaonkar >> /<[EMAIL PROTECTED]>/* wrote: >> >> From: Ketan Padegaonkar <[EMAIL PROTECTED]> >> Subject: Re: [SWTBot-users] Finding widgets which are in >> background or when the application is minimized >> To: swtbot-users@lists.sourceforge.net >> Date: Monday, June 30, 2008, 4:58 AM >> >> 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 >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> 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 >> >> > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > > _______________________________________________ > 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 > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > ------------------------------------------------------------------------ > > _______________________________________________ > 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 > > ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ 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