problem with the wait and assert when having RegEx

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

problem with the wait and assert when having RegEx

Postby simonagav » Wed Nov 05, 2008 1:07 am


I’m trying to record a test case which involves selecting a database object under a node.
When I double click on the data base object type node, for example Tables, I need a wait for the tables node to be populated. I use this:

ui.wait( new TreeItemLocator(TreePath + "/" + objType + ".*" + "/" + objName,ftl ).isVisible() );

-> TreePath/Tables (120)/TableName

I seems that there is a problem in the above line with ".*" which indicates the number of objects for that node. If I use instead the number of objects, the wait works fine.
This is the error that I get:
com.windowtester.runtime.WaitTimedOutException: Timed out waiting for condition:

I need to use ".*" because the number of objects changes very often on the database and I don’t want to modify the test every time I run the test.

I have the same problem with the assert:
ui.assertThat( new TreeItemLocator(TreePath + "/" + objType + ".*" + "/" + objName,ftl ).isVisible() );

Can you tell me please if there is some other way to make the test work?


Posts: 1
Joined: Wed Nov 05, 2008 12:10 am

Re: problem with the wait and assert when having RegEx

Postby Phil Quitslund » Mon Mar 30, 2009 12:01 pm

Sorry for the slow reply on this one!

If this is still an open issue, please drop a line to support at and they will work to put something together for you.


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