How about (untested)

<verifyXPath xpath="count(//[EMAIL PROTECTED]'foo')=0"/>
or
<verifyXPath xpath="not(//[EMAIL PROTECTED]'foo')"/>

Dierk

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Marc Guillemot
> Sent: Donnerstag, 1. November 2007 9:49
> To: [email protected]
> Subject: Re: [Webtest] VerifyElementNotPresent?
>
>
> Hi Bernd,
>
> personally I use something like
> <not>
>   <verifyXPath xpath="//[EMAIL PROTECTED]'foo'"/>
> </not>
>
> but that's nearly as ugly as your proposition ;-(
>
> In general the <not> construct is very powerful but in this case
> something like verifyElementNotPresent could perhaps make sense.
>
> Cheers,
> Marc.
>
> PS: congratulation for the nice blog on Dierk's WebTest session at
> Grails Exchange (in fact for the whole serie)
>
> --
> Blog: http://mguillem.wordpress.com
>
>
>
> Bernd Schiffer wrote:
> > Hi.
> >
> > What's the simplest way to assert that a element with an id (!) is _not_
> > present on a page?
> >
> > Something like
> > <not>
> >   <verifyElementText
> >     htmlId="foo"
> >     regex="true"
> >     text=".*" />
> > </not>
> >
> > But that's ugly and I think there must be a simpler way in
> WebTest, though
> > I'm not that familiar with this tool so far.
> >
> > Thanks in advance,
> >    Bernd
>
>
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to