Validate.Exists gives "Function evaluation timed out"

Ask general questions here.
rkarhe
Posts: 42
Joined: Thu Jul 28, 2011 5:31 am

Validate.Exists gives "Function evaluation timed out"

Post by rkarhe » Mon Aug 01, 2011 1:27 pm

Hi Experts,

I am using Validate.Exists to verify element exists or not as following

Validate.Exists(".//button[@accessiblename='Insert']", 50000, "to check whether insert button exist or not", false)

When I debug and evaluate this line it shows message "Function evaluation timed out." Please suggest, Am I doing anything wrong here? I have tried changing duration.

on same m/c spy identifies ".//button[@accessiblename='Insert']" this object.

Thanks in advance,
Rocky

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.Exists gives "Function evaluation timed out"

Post by Support Team » Mon Aug 01, 2011 4:09 pm

Hi,
rkarhe wrote:When I debug and evaluate this line it shows message "Function evaluation timed out." Please suggest, Am I doing anything wrong here? I have tried changing duration.
Do you debug your code in VS or in Ranorex Studio? I tried to reproduce it with Ranorex Studio and wasn't able too. If you get this error in VS, I would guess there is a hard-coded timeout which cause this error.

Regards,
Peter
Ranorex Team

rkarhe
Posts: 42
Joined: Thu Jul 28, 2011 5:31 am

Re: Validate.Exists gives "Function evaluation timed out"

Post by rkarhe » Mon Aug 01, 2011 5:03 pm

Support Team wrote:Hi,
rkarhe wrote:When I debug and evaluate this line it shows message "Function evaluation timed out." Please suggest, Am I doing anything wrong here? I have tried changing duration.
Do you debug your code in VS or in Ranorex Studio? I tried to reproduce it with Ranorex Studio and wasn't able too. If you get this error in VS, I would guess there is a hard-coded timeout which cause this error.

Regards,
Peter
Ranorex Team
Hi Peter,
Thanks for reply. I debug this in VS. Could you please explain lil more on hard-coded timeout in VS(I myself nowhere set timeout). I am new to VS, C# and Ranorex.
Thanks,
Rocky

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.Exists gives "Function evaluation timed out"

Post by Support Team » Tue Aug 02, 2011 9:59 am

Hi,
rkarhe wrote:ould you please explain lil more on hard-coded timeout in VS(I myself nowhere set timeout). I am new to VS, C# and Ranorex.
Please take a look to following documentation
http://blogs.msdn.com/b/jimgries/archiv ... r-faq.aspx

Regards,
Peter
Ranorex Team

rkarhe
Posts: 42
Joined: Thu Jul 28, 2011 5:31 am

Re: Validate.Exists gives "Function evaluation timed out"

Post by rkarhe » Sun Aug 07, 2011 3:39 am

rkarhe wrote:Hi Experts,

I am using Validate.Exists to verify element exists or not as following

Validate.Exists(".//button[@accessiblename='Insert']", 50000, "to check whether insert button exist or not", false)

When I debug and evaluate this line it shows message "Function evaluation timed out." Please suggest, Am I doing anything wrong here? I have tried changing duration.

on same m/c spy identifies ".//button[@accessiblename='Insert']" this object.

Thanks in advance,
Rocky
On which form will the above code try to find out existence of button. Does Validate.Exists work on the currently active form? Please confirm this. That could be the issue over here.
I think I also can use 'object.Selfino.Exists()' to check the existance of object? Is there any example code which uses 'object.Selfino.Exists()'.

Thanks,
Rocky

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.Exists gives "Function evaluation timed out"

Post by Support Team » Mon Aug 08, 2011 12:53 pm

Hi,
rkarhe wrote: On which form will the above code try to find out existence of button. Does Validate.Exists work on the currently active form? Please confirm this. That could be the issue over here.
The RanoreXPath ".//button[@accessiblename='Insert']" tries to find a button with accessible name "Insert" on you system under test. So if your System is quiet complex to analyze for Ranorex Spy, by having many applications running, it might take a huge amount of time to find this button.
Please try to alter your RanorXPath do not run in problems within finding the button.

Please have a look at following chapters of our user guide to learn more about the RanoreXPath:
rkarhe wrote:I think I also can use 'object.Selfino.Exists()' to check the existance of object? Is there any example code which uses 'object.Selfino.Exists()'
Sure there is a sample code for using this method:
Wait for UI Elements Using Repository

Regards,
Tobias
Support Team