[Webtest] xpath

Janet Gregory Janet Gregory" <janet_gregory@shaw.ca
Tue, 15 Jul 2008 08:33:23 -0600


This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C8E655.7A8E3D90
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Thanks Gary,
 
I will try that.  I was having a hard time selecting a button.  It just
doesn't seem to recognize it at all.
 
Janet

  _____  

From: webtest-admin@lists.canoo.com [mailto:webtest-admin@lists.canoo.com]
On Behalf Of Gary Stillings
Sent: July 15, 2008 8:16 AM
To: webtest@lists.canoo.com
Subject: RE: [Webtest] xpath


Janet,

i don't know if it would be any help but xpathexplorer is a big help for
tricky x paths. and my team and i ran in to an issue with badly formated
html code. we had an issue were webtest could not select a raidio button
because of how it was imbeded in a table imporerly. try running jtidy on
your code and making sure it is at standereds be4 uing webtest. i hope this
helps in some way.

gary stillings

> From: mguillemot@yahoo.fr
> To: webtest@lists.canoo.com
> Subject: Re: [Webtest] xpath
> Date: Tue, 15 Jul 2008 09:34:39 +0200
> 
> Janet,
> 
> your first XPath doesn't select a select field and the second one seems
> invalid to me. Try in you browser to find the right XPath expression
> allowing to select your select/option.
> 
> Cheers,
> Marc.
> -- 
> Blog: http://mguillem.wordpress.com
> 
> 
> Janet Gregory wrote:
> > 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
> > 
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest


  _____  

Need to know now? Get instant answers with Windows Live Messenger. IM on
your terms.
<http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_W
L_messenger_072008>  

------=_NextPart_000_0007_01C8E655.7A8E3D90
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<STYLE>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</STYLE>

<META content=3D"MSHTML 6.00.2900.3354" name=3DGENERATOR></HEAD>
<BODY class=3Dhmmessage>
<DIV dir=3Dltr align=3Dleft><FONT face=3D"Comic Sans MS" =
color=3D#0000ff><SPAN=20
class=3D921101714-15072008>Thanks Gary,</SPAN></FONT></DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3D"Comic Sans MS" =
color=3D#0000ff><SPAN=20
class=3D921101714-15072008></SPAN></FONT>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3D"Comic Sans MS" =
color=3D#0000ff><SPAN=20
class=3D921101714-15072008>I will try that.&nbsp; I was having a hard =
time=20
selecting a button.&nbsp; It just doesn't seem to recognize it at=20
all.</SPAN></FONT></DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3D"Comic Sans MS" =
color=3D#0000ff><SPAN=20
class=3D921101714-15072008></SPAN></FONT>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><FONT face=3D"Comic Sans MS" =
color=3D#0000ff><SPAN=20
class=3D921101714-15072008>Janet</SPAN></FONT></DIV><BR>
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma><B>From:</B> webtest-admin@lists.canoo.com=20
[mailto:webtest-admin@lists.canoo.com] <B>On Behalf Of </B>Gary=20
Stillings<BR><B>Sent:</B> July 15, 2008 8:16 AM<BR><B>To:</B>=20
webtest@lists.canoo.com<BR><B>Subject:</B> RE: [Webtest]=20
xpath<BR></FONT><BR></DIV>
<DIV></DIV>Janet,<BR><BR>i don't know if it would be any help but =
xpathexplorer=20
is a big help for tricky x paths. and my team and i ran in to an issue =
with=20
badly formated html code. we had an issue were webtest could not select =
a raidio=20
button because of how it was imbeded in a table imporerly. try running =
jtidy on=20
your code and making sure it is at standereds be4 uing webtest. i hope =
this=20
helps in some way.<BR><BR>gary stillings<BR><BR>&gt; From:=20
mguillemot@yahoo.fr<BR>&gt; To: webtest@lists.canoo.com<BR>&gt; Subject: =
Re:=20
[Webtest] xpath<BR>&gt; Date: Tue, 15 Jul 2008 09:34:39 +0200<BR>&gt; =
<BR>&gt;=20
Janet,<BR>&gt; <BR>&gt; your first XPath doesn't select a select field =
and the=20
second one seems<BR>&gt; invalid to me. Try in you browser to find the =
right=20
XPath expression<BR>&gt; allowing to select your select/option.<BR>&gt; =
<BR>&gt;=20
Cheers,<BR>&gt; Marc.<BR>&gt; -- <BR>&gt; Blog:=20
http://mguillem.wordpress.com<BR>&gt; <BR>&gt; <BR>&gt; Janet Gregory=20
wrote:<BR>&gt; &gt; Hi folks,<BR>&gt; &gt; <BR>&gt; &gt; I'm new =
to<BR>&gt; &gt;=20
<BR>&gt; &gt; webtest and to ajax, and am trying to figure out how to =
select a=20
row in<BR>&gt; &gt; a table. The xpath that xpathchecker gives to me =
looks like=20
this, and<BR>&gt; &gt; points to a single instance of Quality =
Assurance.<BR>&gt;=20
&gt; <BR>&gt; &gt; " id('<BR>&gt; &gt; <BR>&gt; &gt;=20
userAvailableRolesTable')/tbody/tr[5]/td[2] "<BR>&gt; &gt; <BR>&gt; &gt; =
Can=20
anyone tell me how to turn that statement into a<BR>&gt; &gt; <BR>&gt; =
&gt;=20
webtest select. I feel like I'm doing a bit of trial and error here, =
and<BR>&gt;=20
&gt; this is one of my "trials". If someone can shortcut my learnings, =
I<BR>&gt;=20
&gt; would appreciate it... or point me to a nice library that shows me=20
how<BR>&gt; &gt; to translate into webtest speak.<BR>&gt; &gt; <BR>&gt; =
&gt;=20
"&lt;<BR>&gt; &gt; <BR>&gt; &gt; setSelectField <BR>&gt; &gt;=20
xpath=3D"//select[@id=3D['userAvailableRolesTable']/tbody/tr[5]/td[2]"<BR=
>&gt; &gt;=20
value=3D"Quality Assurance" /&gt; "<BR>&gt; &gt; <BR>&gt; &gt; =
thx,<BR>&gt; &gt;=20
<BR>&gt; &gt; Janet<BR>&gt; &gt; <BR>&gt; <BR>&gt;=20
_______________________________________________<BR>&gt; WebTest mailing=20
list<BR>&gt; WebTest@lists.canoo.com<BR>&gt;=20
http://lists.canoo.com/mailman/listinfo/webtest<BR><BR>
<HR>
Need to know now? Get instant answers with Windows Live Messenger. <A=20
href=3D"http://www.windowslive.com/messenger/connect_your_way.html?ocid=3D=
TXT_TAGLM_WL_messenger_072008"=20
target=3D_new>IM on your terms.</A> </BODY></HTML>

------=_NextPart_000_0007_01C8E655.7A8E3D90--