Page 1 of 1

Can't use Ranorex.validate.Exists(Element,String,Boolean)

Posted: Mon Apr 27, 2009 5:52 am
by marcushe
Working Evironment: Win7 ,Ranorex2.02
Step:
1. Try to use Ranorex->validate->Exists(Element,String,Boolean)
bool Exist= Ranorex.Validate.Exists(repo.SimpleModel,"{0}",true);
2. Studio indicated :
Argument '3' cannot convet from Bool to String
Argument '2' cannot convert from string to Ranorex Duration
Argument '1' cannot convert from xxxxxxx to String
Remark:
I searched .NetAPI and found that Ranorex.validate have 9 Exists method, which are
Exists(String,Duration,String,Boolean)
Exists(RxPath,Duration,String,Boolean)
Exists(Element,String,Boolean)

Therefore ,i assert Studio is considering i'm using
Exists(String,Duration,String)
How could I use Exists(Element,String,Boolean) for my UI element - repo.SimpleModel?

Is that repo.SimpleModle actually a String in Recording1.cs?

By the way ,how to use Exists(String,Duration,String,Boolean)?

Re: Can't use Ranorex.validate.Exists(Element,String,Boolean

Posted: Mon Apr 27, 2009 7:32 am
by marcushe
marcushe wrote:Working Evironment: Win7 ,Ranorex2.02
Step:
1. Try to use Ranorex->validate->Exists(Element,String,Boolean)
bool Exist= Ranorex.Validate.Exists(repo.SimpleModel,"{0}",true);
2. Studio indicated :
Argument '3' cannot convet from Bool to String
Argument '2' cannot convert from string to Ranorex Duration
Argument '1' cannot convert from xxxxxxx to String
Remark:
I searched .NetAPI and found that Ranorex.validate have 9 Exists method, which are
Exists(String,Duration,String,Boolean)
Exists(RxPath,Duration,String,Boolean)
Exists(Element,String,Boolean)

Therefore ,i assert Studio is considering i'm using
Exists(String,Duration,String)
How could I use Exists(Element,String,Boolean) for my UI element - repo.SimpleModel?

Is that repo.SimpleModle actually a String in Recording1.cs?

By the way ,how to use Exists(String,Duration,String,Boolean)?
I correct my code as
bool Exist=Ranorex.Validate.Exists(repo.SimpleModel.Self,"{0}",false);
Then it can pass. But Exist==True , i don't know why it equal true when my application doesn't exist?

Found the way out

Posted: Mon Apr 27, 2009 8:24 am
by marcushe
OK, i must convince that i'm not farmilar with this tool. Why existence of form constantly equal with True is that in *.rxrep , the rxpath=Base:/form ,which means every form accord with this condition.

Problem is sovled