Looking for wicket:id with XPath

Marcin Zajączkowski <[email protected]>
Newsgroups gmane.comp.web.canoo.webtest
Message-ID <[email protected]>
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
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.