Testing property view editor

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

Testing property view editor

Postby hyshyshys » Tue Nov 10, 2009 6:48 am

Hi all,

I want to validate the content of the property view (advanced tab) of my rcp application. My application provides a custom property view where user could edit the property items. Moreover, the property view provides different kind of editors for each property.

Here is my problem:

When I click on a property row of the view, an editor is automatically created and opened as in the following figure. However, I'm not able to get a reference to the editor using WindowTester. I tried with many different combo locators type but it always failed.

For example, in the previous image, how could i get a reference to the selected combobox used to modify the "action on overruns" property.

I tried different methods, but here are some:

1- Using a standard combolocator without the parent argument.
ComboLocator locator = new ComboLocator()

In this case, it returns the fMultipleWidgetsFoundException exception and shows the control I'm looking for...

2- Using a combobox locator with the property view parent argument.

ComboLocator locator = new ComboLocator(new ViewLocator(Messages.getString("Message.PropertyViewId")));

In this case, it returns that the widget is not found.

How should I do? What should be the parent of the locator?

Thanks

Vincent
Attachments
propertyview.JPG
property view editor
propertyview.JPG (29.23 KiB) Viewed 355 times
hyshyshys
 
Posts: 37
Joined: Thu Jul 03, 2008 12:27 pm

Re: Testing property view editor

Postby hyshyshys » Wed Nov 11, 2009 1:33 pm

Hi,

I solve my problem using a SWTWidgetLocator. It seems that the editor of the property view used an CCombo control instead of a Combo control and the ComboLocator doesn't work correctly with the CCombo class.

Vincent
hyshyshys
 
Posts: 37
Joined: Thu Jul 03, 2008 12:27 pm

Re: Testing property view editor

Postby Phil Quitslund » Wed Nov 11, 2009 8:26 pm

A quick thought would be to try a CComboItemLocator, but from the sound of your last post you have your issue resolved. Is that right?
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: Testing property view editor

Postby hyshyshys » Thu Nov 12, 2009 9:28 am

Yes. Thanks

Vincent
hyshyshys
 
Posts: 37
Joined: Thu Jul 03, 2008 12:27 pm

Re: Testing property view editor

Postby Phil Quitslund » Wed Nov 18, 2009 10:25 am

Good to know. 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