How do i use validate.Exists(element,message,boolean)
Posted: Mon Apr 27, 2009 8:35 am
Working Evironment: win7 ,Ranorex2.02
Step:
To judge whether a form exist , we can use
Try
{
....Form action
}
Catch()
{
}
.
But seems validate.Exists also offer a way . So i use Exists like this
if (Ranorex.validate.Exists(repo.SimpleModel.Self,"xx",false)==false)
{
}
According to usage in UserGuide , set boolean to false should not provoke an exceptioin . Actually, when program run to if() , and the form does not exist ,it will throw out an exception , which state the form does not exist
Step:
To judge whether a form exist , we can use
Try
{
....Form action
}
Catch()
{
}
.
But seems validate.Exists also offer a way . So i use Exists like this
if (Ranorex.validate.Exists(repo.SimpleModel.Self,"xx",false)==false)
{
}
According to usage in UserGuide , set boolean to false should not provoke an exceptioin . Actually, when program run to if() , and the form does not exist ,it will throw out an exception , which state the form does not exist