Menu locator

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

Menu locator

Postby jcoulomb » Mon Mar 07, 2011 1:54 am

Hello,

I updated my version of WT (from 3.8 to 6.0) and one of my tests no longer works correctly.
In this test, a menu is displayed and i select a Menu Item on it.

Code: Select all
//this action display the menu
ui.click(new ButtonLocator(""));
ui.click(new MenuItemLocator("Constant"));


the test click on the button, a menu is displayed, but the Menu Item cannot be found : Widget NOT Found : MenuItemLocator("Constant")

i tried to know what WindowTester can see. The following method new SWTWidgetLocator(Menu.class).findAll(ui) returns only 1 menu (maybe the menu corresponding to the activeMenu of the shell), but the DebugHelpers shows clearly multiple Menus :

Code: Select all
Shell {Query Panel}<HC|30940979>
Menu {}<HC|15754465>
Menu {}<HC|7281758>
Menu {}<HC|11501662>
Menu {}<HC|1358712>
Menu {}<HC|18874065>
Menu {}<HC|26381188>
Menu {}<HC|16314481>
Menu {}<HC|370615>
Menu {Constant, LOV, Object, Prompt}<HC|21362427>
  MenuItem {Constant}<HC|5903587>
  MenuItem {LOV}<HC|1140259>
  MenuItem {Object}<HC|4767843>
  MenuItem {Prompt}<HC|5168428>
Composite {}<HC|26341925>
...


is there a way (a new locator maybe) for me to update my tests ?

Thank you,

Josselin
jcoulomb
 
Posts: 3
Joined: Mon Feb 21, 2011 6:58 am

Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest

cron