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

Reply via email to