Locate a GEF figure in a view - still waiting

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

Locate a GEF figure in a view - still waiting

Postby vizardofoz » Fri Apr 30, 2010 12:16 am

As I already wrote (15.04.2010 Locate a GEF figure in a view), I would like to know if that is possible and eventually HOW. Here the old question:

I am trying to locate a GEF figure that is in a View not in an Editor.
I tried with this locator:

ui.click(new LRLocator(0, new FigureClassLocator("org.eclipse.draw2d.Ellipse")));

and dosen´t work even if an Ellipse is in the figure.

I tried with named figure:

ui.click(new NamedFigureLocator("my.figure"));
(of course I gave a name to the Figure and the proper method)

When I have an Editor all is working but if the GEF is in a View I can find only the FigureCanvas with the following locator.

final XYLocator pn = new XYLocator(new SWTWidgetLocator(FigureCanvas.class, new ViewLocator("fhmi.views.systemTracks")), 60, 60);

It seems there are no ways to locate the figure. Is that true? If there are some ways could someone tell me how I have to do?

I am using
version 5.0.0.r35x201003301502 for Eclipse 3.5
Posts: 8
Joined: Thu Apr 08, 2010 7:04 am

Re: Locate a GEF figure in a view - still waiting

Postby Phil Quitslund » Mon May 03, 2010 9:06 am

Sorry for the slow reply!

I wonder if it works for you if you explicitly scope the locators by their containing view? That is, something like:

Code: Select all
ViewLocator view = new ViewLocator("com.your.view.id.here");
FigureLocator locator = new FigureLocator(matcher, view);

If this works, we know the issue is in our scope resolution in the implicit case and that narrows things down a bit. (Plus, it provides a potential work-around for you.)

Thanks for your patience.
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
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