[Webtest] xpath

Janet Gregory Janet Gregory <janet_gregory@shaw.ca>
Thu, 10 Jul 2008 16:00:37 -0600


This is a multi-part message in MIME format.

----aeea38d9379892bee6ac2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Hi folks,
I'm new to 
webtest and to ajax, and am trying to figure out how to select a row in a table. The xpath that xpathchecker gives to me looks like this, and points to a single instance of Quality Assurance. 
"     id('
userAvailableRolesTable')/tbody/tr[5]/td[2] "
Can anyone tell me how to turn that statement into a 
webtest select. I feel like I'm doing a bit of trial and error here, and this is one of my "trials". If someone can shortcut my learnings, I would appreciate it... or point me to a nice library that shows me how to translate into webtest speak. 
 "<
setSelectField  xpath="//select[@id=['userAvailableRolesTable']/tbody/tr[5]/td[2]" value="Quality Assurance" /> "
thx, 
Janet

----aeea38d9379892bee6ac2
Content-Type: text/html; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

<P>Hi folks,</P>
<P>I'm new to </P>webtest&nbsp;and to ajax, and am trying to figure out how to select a row in a table. The xpath&nbsp;that xpathchecker&nbsp;gives to me looks like this, and points to a single instance of Quality Assurance. 
<P></P>
<P>"&nbsp;&nbsp;&nbsp;&nbsp; id('</P>userAvailableRolesTable')/tbody/tr[5]/td[2] "
<P></P>
<P></P>
<P></P>
<P>Can anyone tell me how to turn that statement into a </P>webtest&nbsp;select. I feel like I'm doing a bit of trial and error here,&nbsp;and this is one of my "trials". If someone can shortcut my learnings, I would appreciate it... or point me to a nice library that shows me how to translate into webtest&nbsp;speak. 
<P></P>
<P>&nbsp;"&lt;</P>setSelectField&nbsp; xpath="//select[@id=['userAvailableRolesTable']/tbody/tr[5]/td[2]" value="Quality Assurance" /&gt; "
<P></P>
<P></P>
<P></P>thx, 
<P></P>
<P>Janet</P>

----aeea38d9379892bee6ac2--