8 messages in com.canoo.lists.webtest[Webtest] XPath syntax question...
FromSent OnAttachments
Colin O'Brien12 May 2005 09:32 
Siegfried Goeschl12 May 2005 09:45 
Marc Guillemot12 May 2005 10:14 
Colin O'Brien13 May 2005 09:20 
Colin O'Brien16 May 2005 00:41 
Mrinal16 May 2005 05:00 
Marc Guillemot16 May 2005 05:53 
Siegfried Goeschl17 May 2005 02:48 
Subject:[Webtest] XPath syntax question...
From:Colin O'Brien (coli@capetechnologies.com)
Date:05/12/2005 09:32:19 AM
List:com.canoo.lists.webtest

Hi,

I have a page with a table containing multiple rows, each row is 9 cells wide containing specific unique information as well as buttons common for each row.

I'm using the following XPath expression in an attempt to locate an action button specific to one of the rows in the table

//tr[td='RB-2758']/td[6]/a/img/@alt

So as I read this expression, XPath should return the row with the cell containing the text RB-2758, move 6 cells across from this position and select the value of the alt attribute of the image tag inside the anchor tag, however the row I'm looking for is not resolved, instead the first row in the table is returned.

I thought that the XPath should be relative to the current position in the DOM, in this case the row with text RB-2758...?

I've tried this with webTest 1.6 and 1.7 R_760 given there are some problems with XPath and WT 1.7, the same result occurs with both versions... The number of rows in the table is liable to change the only thing that is guaranteed to remain constant is the name field, i.e. RB-2758.

Any ideas much appreciated...

Kind Regards, Colin.