Re: Looking for wicket:id with XPath

Marcel Primeau <mprim58-/[email protected]>
Newsgroups gmane.comp.web.canoo.webtest
Message-ID <[email protected]>
Hi Marcin,
 
Did you try this :
 
  <clickButton label="Cancel" 
           xpath="//*[@class='btn']"/>
 
this is another way to check a button.
 
Thanks
 
Marcel
De : Marcin Zajączkowski <[email protected]>
À : [email protected] 
Envoyé le : mardi 26 novembre 2013 7h48
Objet : [Webtest] Looking for wicket:id with XPath


Hi,

I try to use WebTests to locate a quite unpleasant button (link)
generate by a Wicket-Bootstrap library.

> <button class="btn " onclick="var win = this.ownerDocument.defaultView || this.ownerDocument.parentWindow; if (win == window) { window.location.href='./userEdit?7-1.ILinkListener-userEditForm-userEditPanel-buttonsGroup-cancelButton'; } ;return false" wicket:id="cancelButton">

WebTest recorder suggests:
> <clickButton label="Cancel "/>

but it doesn't work. I tried with looking for wicket:id with xpath:
> //button[@*[local-name()='wicket:id']='cancelButton']

and it works fine in a WebTest recorder, but unfortunately doesn't match
anything when used in xml:

> <clickbutton xpath="//button[@*[local-name()='wicket:id']='cancelButton']" description="Click Cancel"/>

I can use index to locate this button, but xpath by wicket:id would be
more precise. Is this xpath syntax supported?

webtest-maven-plugin 1.0.0 with htmlunit upgraded to 2.12.

Marcin

-- 
http://blog.solidsoft.info/- Working code is not enough
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.