this should work too but doesn't produce informative error messages. If this fails you would just have something like "expected true but was false" and no information on the found element.
Happy testing, Marc. -- Blog: http://mguillem.wordpress.com Dierk Koenig wrote: > 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) >> >> >> >> 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

