Timeout on fuction .hastext()

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

Timeout on fuction .hastext()

Postby clausvp » Wed Oct 01, 2008 3:38 am

I am using the function .hastext() on a text field in my application.

The problem is that the wait timeout on the condition is way to long. Is there any way to adjust this? or in someway give a parameter which sets the wanted timeout?
Posts: 2
Joined: Wed Oct 01, 2008 3:35 am

Re: Timeout on fuction .hastext()

Postby Phil Quitslund » Tue Oct 07, 2008 9:25 am

If it's a condition that you want to evaluate once (and not retry) you could just do this:

Code: Select all

but it is a bit cumbersome...

Alternatively, you could just wait and set a really short retry timeout (how about 0ms? ;)):

Code: Select all
ui.wait(myLocator.hasText(expectedText), 0);
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