Open GoogleCodeExporter opened 9 years ago
The same Problem exists with ScrolledComposites.
Apparently WT is able to locate the Widget outside the visible area, but a
ui.click(ILocator) on that Widget will cause WT to perform a click outside of
the Shell, which potentially affects other open applications.
Original comment by max.hohe...@gmail.com
on 18 Mar 2013 at 3:41
Added a test case for ScrolledComposites.
One approach could be to find out if a SWT control (eg. a button) is contained
in a ScrolledComposite by iterating through it's parent elements. If it is,
then the .show() method of ScrolledComposite could be used to make the control
visible.
I tried it with a little hack for a single locator (ButtonLocator) and it
worked, but a more general solution for all kinds of locators would be needed.
Original comment by fred.g...@googlemail.com
on 19 Mar 2013 at 11:27
Attachments:
I created a new handler that can be used with IUIContext.ensureThat(...) to
address this issue.
Because the code iterates over all ancestors, to ensure that the given control
is fully visible even with several ScrolledComposites in the hierarchy, it
might be a bad idea to scroll every locator automatically. Though this is not
consistent with the behavior i.e. in TreeViewers, at least in large
applications it could slow down the tests significantly to always try scrolling
automatically. If this is not the case, it should still be possible to use this
handler without major changes.
@Fred, currently the handler needs a small workaround. Hopefully you can
improve this (see comments).
See the discussion in the forum:
https://groups.google.com/forum/?fromgroups=#!topic/windowtester-pro/r1cfARlH6Fg
Original comment by max.hohe...@gmail.com
on 29 Mar 2013 at 9:03
Attachments:
Original issue reported on code.google.com by
PawanGa...@gmail.com
on 18 Feb 2013 at 5:13Attachments: