Error in generated script

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

Error in generated script

Postby lithwin » Thu Nov 11, 2010 9:26 pm

tool generates error code when trying to record a menubar item click

================================================================================================
ui.click(new NamedWidgetLocator("someButton", 1, new NamedWidgetLocator("LeftToolBar")));

The constructor NamedWidgetLocator(String, int, NamedWidgetLocator) is undefined
================================================================================================


can anyone throw some light on this?
lithwin
 
Posts: 1
Joined: Thu Nov 11, 2010 9:17 pm

Re: Error in generated script

Postby keertip » Fri Nov 12, 2010 10:07 am

Change it to
Code: Select all
ui.click(new NamedWidgetLocator("someButton"));

and see whether the test runs successfully.The NamedWidgetLocator is used when the widgets are named, and the names are usually unique. This implies there is no need to specify any other information about the widget, such as index or parent locator. In this case the name may not be unique, that may be a reason for the tool generating code like that.
keertip
Moderator
 
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

cron