[Webtest] Looking for wicket:id with XPath

Marcel Primeau Marcel Primeau <mprim58@yahoo.com>
Tue, 26 Nov 2013 05:10:12 -0800 (PST)


--2019092845-460229354-1385471412=:97651
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi Marcin,=0A=C2=A0=0ADid you try this :=0A=C2=A0=0A=C2=A0 <clickButton lab=
el=3D"Cancel" =0A=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 xpath=3D"//*[@class=3D'btn']"/>=0A=C2=A0=0Athis is another way to check=
 a button.=0A=C2=A0=0AThanks=0A=C2=A0=0AMarcel=0ADe=C2=A0: Marcin Zaj=C4=85=
czkowski <mszpak@wp.pl>=0A=C3=80=C2=A0: webtest@lists.canoo.com =0AEnvoy=C3=
=A9 le : mardi 26 novembre 2013 7h48=0AObjet=C2=A0: [Webtest] Looking for w=
icket:id with XPath=0A=0A=0AHi,=0A=0AI try to use WebTests to locate a quit=
e unpleasant button (link)=0Agenerate by a Wicket-Bootstrap library.=0A=0A>=
 <button class=3D"btn " onclick=3D"var win =3D this.ownerDocument.defaultVi=
ew || this.ownerDocument.parentWindow; if (win =3D=3D window) { window.loca=
tion.href=3D'./userEdit?7-1.ILinkListener-userEditForm-userEditPanel-button=
sGroup-cancelButton'; } ;return false" wicket:id=3D"cancelButton">=0A=0AWeb=
Test recorder suggests:=0A> <clickButton label=3D"Cancel "/>=0A=0Abut it do=
esn't work. I tried with looking for wicket:id with xpath:=0A> //button[@*[=
local-name()=3D'wicket:id']=3D'cancelButton']=0A=0Aand it works fine in a W=
ebTest recorder, but unfortunately doesn't match=0Aanything when used in xm=
l:=0A=0A> <clickbutton xpath=3D"//button[@*[local-name()=3D'wicket:id']=3D'=
cancelButton']" description=3D"Click Cancel"/>=0A=0AI can use index to loca=
te this button, but xpath by wicket:id would be=0Amore precise. Is this xpa=
th syntax supported?=0A=0Awebtest-maven-plugin 1.0.0 with htmlunit upgraded=
 to 2.12.=0A=0AMarcin=0A=0A-- =0Ahttp://blog.solidsoft.info/- Working code =
is not enough=0A_______________________________________________=0AWebTest m=
ailing list=0AWebTest@lists.canoo.com=0Ahttp://lists.canoo.com/mailman/list=
info/webtest
--2019092845-460229354-1385471412=:97651
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><body><div style=3D"color:#000; background-color:#fff; font-family:He=
lveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, lin=C3=A9ale;=
font-size:12pt"><div style=3D"RIGHT: auto"><SPAN style=3D"RIGHT: auto">Hi M=
arcin,</SPAN></div>
<div style=3D"RIGHT: auto"><SPAN style=3D"RIGHT: auto"></SPAN>&nbsp;</div>
<div style=3D"BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMIL=
Y: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, lin=C3=
=A9ale; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style=3D"RIG=
HT: auto">Did you try this :</SPAN></div>
<div style=3D"RIGHT: auto"><SPAN style=3D"RIGHT: auto"></SPAN>&nbsp;</div>
<div style=3D"RIGHT: auto"><SPAN style=3D"RIGHT: auto">&nbsp; &lt;clickButt=
on label=3D"Cancel" </SPAN></div>
<div style=3D"BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMIL=
Y: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, lin=C3=
=A9ale; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style=3D"RIG=
HT: auto">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xpat=
h=3D"//*[@class=3D'btn']"/&gt;</SPAN></div>
<div style=3D"RIGHT: auto">&nbsp;</div>
<div style=3D"RIGHT: auto">this is another way to check a button.</div>
<div style=3D"RIGHT: auto">&nbsp;</div>
<div style=3D"RIGHT: auto">Thanks</div>
<div style=3D"RIGHT: auto">&nbsp;</div>
<div style=3D"RIGHT: auto">Marcel</div>
<DIV style=3D"FONT-FAMILY: HelveticaNeue, Helvetica Neue, Helvetica, Arial,=
 Lucida Grande, lin=C3=A9ale; FONT-SIZE: 12pt">
<DIV style=3D"FONT-FAMILY: HelveticaNeue, Helvetica Neue, Helvetica, Arial,=
 Lucida Grande, lin=C3=A9ale; FONT-SIZE: 12pt">
<DIV style=3D"RIGHT: auto" dir=3Dltr>
<DIV style=3D"BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; P=
ADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PAD=
DING-RIGHT: 0px; HEIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; B=
ORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" contentEditable=3Dfalse read=
only=3D"true"></DIV><FONT size=3D2 face=3DArial><B><SPAN style=3D"FONT-WEIG=
HT: bold">De&nbsp;:</SPAN></B> Marcin Zaj=C4=85czkowski &lt;mszpak@wp.pl&gt=
;<BR><B><SPAN style=3D"FONT-WEIGHT: bold">=C3=80&nbsp;:</SPAN></B> webtest@=
lists.canoo.com <BR><B><SPAN style=3D"FONT-WEIGHT: bold">Envoy=C3=A9 le :</=
SPAN></B> mardi 26 novembre 2013 7h48<BR><B><SPAN style=3D"FONT-WEIGHT: bol=
d">Objet&nbsp;:</SPAN></B> [Webtest] Looking for wicket:id with XPath<BR></=
FONT></DIV>
<DIV style=3D"RIGHT: auto"><BR>Hi,<BR><BR>I try to use WebTests to locate a=
 quite unpleasant button (link)<BR>generate by a Wicket-Bootstrap library.<=
BR><BR>&gt; &lt;button class=3D"btn " onclick=3D"var win =3D this.ownerDocu=
ment.defaultView || this.ownerDocument.parentWindow; if (win =3D=3D window)=
 { window.location.href=3D'./userEdit?7-1.ILinkListener-userEditForm-userEd=
itPanel-buttonsGroup-cancelButton'; } ;return false" wicket:id=3D"cancelBut=
ton"&gt;<BR><BR>WebTest recorder suggests:<BR>&gt; &lt;clickButton label=3D=
"Cancel "/&gt;<BR><BR>but it doesn't work. I tried with looking for wicket:=
id with xpath:<BR>&gt; //button[@*[local-name()=3D'wicket:id']=3D'cancelBut=
ton']<BR><BR>and it works fine in a WebTest recorder, but unfortunately doe=
sn't match<BR>anything when used in xml:<BR><BR>&gt; &lt;clickbutton xpath=
=3D"//button[@*[local-name()=3D'wicket:id']=3D'cancelButton']" description=
=3D"Click Cancel"/&gt;<BR><BR>I can use index to locate this button, but xp=
ath by wicket:id would
 be<BR>more precise. Is this xpath syntax supported?<BR><BR>webtest-maven-p=
lugin 1.0.0 with htmlunit upgraded to 2.12.<BR><BR>Marcin<BR><BR>-- <BR><A =
href=3D"http://blog.solidsoft.info/" target=3D_blank>http://blog.solidsoft.=
info/</A>- Working code is not enough<BR>__________________________________=
_____________<BR>WebTest mailing list<BR><A href=3D"mailto:WebTest@lists.ca=
noo.com" ymailto=3D"mailto:WebTest@lists.canoo.com">WebTest@lists.canoo.com=
</A><BR><A href=3D"http://lists.canoo.com/mailman/listinfo/webtest" target=
=3D_blank>http://lists.canoo.com/mailman/listinfo/webtest</A><BR><BR><BR></=
DIV></DIV></DIV></div></body></html>
--2019092845-460229354-1385471412=:97651--