Validate.NotExists? : Automation API

Validate.NotExists?

Class library usage, coding and language questions.

Validate.NotExists?

Postby max » Mon Oct 12, 2009 5:00 pm

Why isn't there a Validate.NotExists-Method? I think it would be useful.
What is your suggested way to check if for example a form doesn't exist?

Following code works for me till now:
try
{
	if(Host.Local.FindSingle(path) != null)
	{
		return true;
	}
	return false;
}
catch(ElementNotFoundException ex)
{
	//Do something with ex
	return false;
}

Max
max
 
Posts: 8
Joined: Mon Oct 12, 2009 4:43 pm

Re: Validate.NotExists?

Postby Support Team » Tue Oct 13, 2009 4:05 pm

You are right, a Validate.NotExists method would really be useful. That's why the upcoming version Ranorex 2.2 will provide such methods.

(Additional information: Validate.NotExists methods did not exist in previous version, since Validate.Exists/NotExists had problems with repository items. These problems will be solved with Ranorex 2.2, allowing the Validate.NotExists methods to be added.)

Regards,
Alex
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4285
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Validate.NotExists?

Postby max » Wed Oct 14, 2009 10:30 am

Thanks for your reply.
I found a similar post in "General Questions". Sorry for asking without using search before :)
http://www.ranorex.com/forum/how-to-validate-a-non-exist-of-one-object-t1047.html
The upcoming version of Ranorex seems to get really needful features.

Max
max
 
Posts: 8
Joined: Mon Oct 12, 2009 4:43 pm

Re: Validate.NotExists?

Postby Support Team » Wed Oct 14, 2009 10:39 am

max wrote:The upcoming version of Ranorex seems to get really needful features.

We tried to implement as many customer requested features as possible :-)

Regards,
Alex
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4285
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests