Recording drags within canvas

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

Recording drags within canvas

Postby CageHunter » Thu Oct 07, 2010 1:37 am

I need to test an RCP App which uses a Canvas to display high resolution graphics.
Within this canvas you can zoom and move within the graphics as well as paint on them.
The recorder is capable to find the Widget :
Code: Select all XYLocator(new SWTWidgetLocator(Canvas.class,
                new SWTWidgetLocator(Composite.class, 0, new SWTWidgetLocator(
                        CTabFolder.class))), 786, 102));

but it didn't realize that i need the coordinates where i dragged to :
Code: Select all
ui.dragTo(new SWTWidgetLocator(Canvas.class, new SWTWidgetLocator(
            Composite.class, 0, new SWTWidgetLocator(CTabFolder.class))));

as you see it just records the target component but that's not enough for my purposes.

My question is :
How can i modify the recorder's localization behaviour to automatically solve this problem?
Posts: 1
Joined: Thu Oct 07, 2010 1:23 am

Re: Recording drags within canvas

Postby keertip » Mon Oct 11, 2010 10:51 am

The recorder should have wrapped the SWTWidgetLocator in an XY locator to capture the coordinates. What version of WindowTester are you using? Could you post a screen shot of the canvas?
Posts: 221
Joined: Thu Mar 15, 2007 10:26 am

Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest