[Webtest] Re: Xpath validations
Denis N. Antonioli
webtest@lists.canoo.com
Fri, 17 Dec 2004 13:14:59 +0100 (CET)
Hi
I did something similar last week ;-)
Sniplet:
<verifyxpath
xpath="count(//select[@name='select1']/option[@value='${expected.option}'])"
text="1"
/>
check in a specific html <select> that I have one <option> with a specified value.
The expected value is in a property, as it changes from test to test.
Hope that helps.
dna
On Fri, 17 Dec 2004, Marc Guillemot wrote:
> Yes it does. I guess that your xpath is not correct.
>
> Marc.
>
> kay@hallo.ms wrote:
> > Hi,
> >
> > Does anybody know whether it is possible when using xpath to locate a document node to validate something other than textual or the presence of the node?
> >
> > I'd like to check e.g. whether a certain select box has two selected entries.
> > Normally with xpath it should be possible to return a boolean on a count function ( if I got things right )
> > But I didn't succeed in writing a webtest that does this.
> >
> > Kay
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>