Locate a GEF figure in a View

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

Postby vizardofoz » Thu Apr 15, 2010 4:29 am

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?
Thanks
vizardofoz
 
Posts: 8
Joined: Thu Apr 08, 2010 7:04 am

Re: Locate a GEF figure in a View

Postby Phil Quitslund » Thu Apr 15, 2010 9:17 am

Hmmmm.... This should be do-able.

What version of WT are you using?
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: Locate a GEF figure in a View

Postby vizardofoz » Thu Apr 15, 2010 11:14 pm

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

Re: Locate a GEF figure in a View

Postby Phil Quitslund » Mon May 03, 2010 9:07 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);
getUI().click(locator);

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
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: Locate a GEF figure in a View

Postby vizardofoz » Tue Jun 22, 2010 2:31 am

It does not work anyway!
Some ideas?
Thanks
vizardofoz
 
Posts: 8
Joined: Thu Apr 08, 2010 7:04 am

Re: Locate a GEF figure in a View

Postby Phil Quitslund » Tue Jun 22, 2010 1:46 pm

This is looking more and more like something our support team will have to focus on. Please go ahead and send a ticket to support and they'll investigate further.

Thanks!
--
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