Rather than a "verifyElementNotPresent" step, would it be easier to
introduce an optional attribute?  The attribute would have the same
effect as wrapping the step in a <not>, but it would be much terser in
syntax.  That way, you could turn ANY verification step into a
"verifyNOTxxx" step just by setting the attribute.

Thanks,
Nate

--__--__--

Message: 12
Date: Thu, 01 Nov 2007 09:49:23 +0100
From: Marc Guillemot <[EMAIL PROTECTED]>
To:  [email protected]
Subject: Re: [Webtest] VerifyElementNotPresent?
Reply-To: [email protected]
Reply-To: Marc Guillemot <[EMAIL PROTECTED]>

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


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

Reply via email to