Validate.NotExists?

Class library usage, coding and language questions.
max
Posts: 8
Joined: Mon Oct 12, 2009 3:43 pm

Validate.NotExists?

Post by max » Mon Oct 12, 2009 4: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

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Validate.NotExists?

Post by Support Team » Tue Oct 13, 2009 3: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

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

Re: Validate.NotExists?

Post by max » Wed Oct 14, 2009 9: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-val ... t1047.html
The upcoming version of Ranorex seems to get really needful features.

Max

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Validate.NotExists?

Post by Support Team » Wed Oct 14, 2009 9: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