Page 1 of 1

How to check if element isn't shown?

Posted: Wed Jun 01, 2011 6:03 pm
by WajdaW
I have situation where I need to check if element isn't found.
It comes to my mind to Search for this element and catch TimeOutException
try
{
FindSingle(element, timeout);
}
catch
{
// element isn't there
}

So is this only way or is there some better way to do this?

regards,

Vladimir Vajda

Re: How to check if element isn't shown?

Posted: Wed Jun 01, 2011 7:48 pm
by Support Team
Hello Vladimir,

there is
validate.NotExists()
which internally does exactly that.

Regards,
Roland
Ranorex Support Team

Re: How to check if element isn't shown?

Posted: Thu Jun 02, 2011 10:38 am
by WajdaW
Thanks, Roland.

Regards,

Vladimir Vajda