Simulate scroll with Scroll-wheel ()

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

Simulate scroll with Scroll-wheel ()

Postby a.bitsche » Fri Jun 01, 2007 1:43 am

Is it possible to simulate the scroll-wheel action?
With the mouse-button in the middle it's possible to scroll and click but the actions won't be recorded.
a.bitsche
 
Posts: 31
Joined: Tue Aug 22, 2006 2:53 am
Location: Austria

Postby Mac » Fri Jun 01, 2007 6:58 am

maybe you can use the arrow keys on the Keyboard instead...

ui.keyclick(WT.ARROWDOWN);
Mac
 
Posts: 14
Joined: Thu Apr 05, 2007 4:19 am

Postby a.bitsche » Mon Jun 04, 2007 2:00 am

Thanks for the reply.
But unfortunately this won't work.
a.bitsche
 
Posts: 31
Joined: Tue Aug 22, 2006 2:53 am
Location: Austria

Postby Phil Quitslund » Mon Jun 04, 2007 10:56 am

Unfortunately we do not have scrollbar support. For this you will have to resort to a low level tool like abbot. Have you tried the abbot CanvasTester? This class safely proxies
org.eclipse.swt.widgets.Canvas.scroll(int, int, int, int, int, int, boolean). The scroll javadocs are included below:

Code: Select all
/**
* Scrolls a rectangular area of the receiver by first copying
* the source area to the destination and then causing the area
* of the source which is not covered by the destination to
* be repainted. Children that intersect the rectangle are
* optionally moved during the operation. In addition, outstanding
* paint events are flushed before the source area is copied to
* ensure that the contents of the canvas are drawn correctly.
*
* @param destX the x coordinate of the destination
* @param destY the y coordinate of the destination
* @param x the x coordinate of the source
* @param y the y coordinate of the source
* @param width the width of the area
* @param height the height of the area
* @param all <code>true</code>if children should be scrolled, and <code>false</code> otherwise
*
* @exception SWTException <ul>
*    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
*    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*/
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest