TreeItem with a / in path

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

TreeItem with a / in path

Postby Mac » Fri May 11, 2007 6:31 am

Hi all,

I am trying to click a TreeItem that has a / in its name.
Therefore I get a Widgetnotfoundexception, as it will be detected as a new subitem...

I tried to escape them with a \ but it seems like .replaceAll("/","\\/");
does not have an effect...

I also tried to exchange the / with a dot (.) as this should be considered as a regex, but it doesnt work too.

thanks for your answears!
Mac
 
Posts: 14
Joined: Thu Apr 05, 2007 4:19 am

Postby Phil Quitslund » Tue May 22, 2007 3:04 pm

Could you post the path and the locator you are using?

Thanks
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Postby Mac » Fri May 25, 2007 4:40 am

here is the code:

-------------------------------------------------------------------------
static final String specCharName0 = "!\"§$%&()";
static final String specCharName1 = "=?/";
static final String specCharName2 = "32+*#-_";
static final String specCharName3 = "´`°^.:,;";

static final String specCharNameTable = specCharName0+specCharName1+specCharName2+specCharName3;

[...]

TableCreatorHelper tab = new TableCreatorHelper(ui,specCharNameTable,c0,treeItem,"MONA");

[...]


ui.click(2,new TreeItemLocator(tab.getPathToTable(),tree));//clicking Path twice

------------------------this is what the methods do-----------------


public String getPathToTable(){
return tableTreeItem.getPath()+"/"+mySchema+"/"+getTableName();
}


public String getTableName(){
String newTabName = tableName.toUpperCase();
newTabName = newTabName.replaceAll("ß","SS");
return newTabName;
}

------------------------------------------------------------------

So the TreeItem I am looking for is:

guiTester/dummy_landscape/Servers/BERD3000138998A/MAXDB3/MONA/Tables/MONA/!"§$%&()=?/32+*#-_´`°^.:,;

Where !"§$%&()=?/32+*#-_´`°^.:,; is the actual name of the Tree item, but Iguess the ui is looking for an item named !"§$%&()=?
with the subitem 32+*#-_´`°^.:,;
so how can I overcoem this issue ?
Mac
 
Posts: 14
Joined: Thu Apr 05, 2007 4:19 am

Postby Phil Quitslund » Mon Jun 04, 2007 11:30 am

Could you forward this on to support?

wintest-support@instantiations.com

This looks like a bug that needs fixing.

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