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

Ask general questions here.
marcushe
Posts: 112
Joined: Tue Apr 14, 2009 6:38 am

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

Post by marcushe » Mon Apr 27, 2009 5:52 am

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)?

marcushe
Posts: 112
Joined: Tue Apr 14, 2009 6:38 am

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

Post by marcushe » Mon Apr 27, 2009 7:32 am

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?

marcushe
Posts: 112
Joined: Tue Apr 14, 2009 6:38 am

Found the way out

Post by marcushe » Mon Apr 27, 2009 8:24 am

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