Hi,
What I am trying to do is wait for the footer to appear, and then check that the innertext contains a specific string, are there anyways of not adding delays as I have done and have something more robust, I appreciate your help. Also I am getting the error:
"Failed to instrument Java process", as shown below did you find a workaround for this problem ?
TdTag footerInfo = "/dom[1]//td[#'footerInfo']";
Delay.Milliseconds(200);
Validate.Exists(footerInfo);
Delay.Milliseconds(500);
if(footerInfo.InnerText.Contains("SRDS"))
{
Report.Info(footerInfo.InnerText);
}
===================
Ranorex 5.1
Windows 7 (VM)
Java 1.6.0_26
Intermittent Ranorex warnings on new Java windows/forms:
"Failed to instrument Java process. Please make sure you have enough privileges to access the process.
(This message is only shown once per report.)"
Avoiding Delays
Re: Avoiding Delays
Hi,
I would suggest to use WaitForExists(timeout) instead of delays. It waits for existence of the associated repo item. Check this page for more details...
http://www.ranorex.com/Documentation/Ra ... Exists.htm
I would suggest to use WaitForExists(timeout) instead of delays. It waits for existence of the associated repo item. Check this page for more details...
http://www.ranorex.com/Documentation/Ra ... Exists.htm
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Avoiding Delays
Hi,
I tried the below but I get an error shown below :
repo.SymptomDrivenDiagnostics.FooterInfo.WaitForExists(10000);
Error :
'Ranorex.TdTag' does not contain a definition for 'WaitForExists' and no extension method 'WaitForExists' accepting a first argument of type 'Ranorex.TdTag' could be found (are you missing a using directive or an assembly reference?) (CS1061)
I tried the below but I get an error shown below :
repo.SymptomDrivenDiagnostics.FooterInfo.WaitForExists(10000);
Error :
'Ranorex.TdTag' does not contain a definition for 'WaitForExists' and no extension method 'WaitForExists' accepting a first argument of type 'Ranorex.TdTag' could be found (are you missing a using directive or an assembly reference?) (CS1061)
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Avoiding Delays
Hello zshadow,
It seems like you are using an old version of Ranorex. Please note that the "WaitForExists" method was introduced with Ranorex version 5.0.0.
Regards,
Robert
It seems like you are using an old version of Ranorex. Please note that the "WaitForExists" method was introduced with Ranorex version 5.0.0.
Regards,
Robert
Re: Avoiding Delays
Hi Robert,
I am using Ranorex version 5.1.1
Regards
zshadow
I am using Ranorex version 5.1.1
Regards
zshadow
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Avoiding Delays
To use the WaitForExists method you need a RepoItemInfo instance to call that method on. You have to use the Ranorex repository to create such an instance.
In your code, you search directly for an element with that line using the Adapter.DefaultSearchTimeout which is 10 seconds by default:
Either use the Ranorex repository where you can easily set a timeout within the element needs to appear or use a Host.Local.FindSingle call and specify the timeout there.
I recommend going through the first few chapters of the Ranorex User Guide
Regards,
Alex
Ranorex Team
In your code, you search directly for an element with that line using the Adapter.DefaultSearchTimeout which is 10 seconds by default:
TdTag footerInfo = "/dom[1]//td[#'footerInfo']";If the item is not found within that timeout, an exception will be thrown and the next code line will never be reached; i.e. footerInfo will not have a value then.
Either use the Ranorex repository where you can easily set a timeout within the element needs to appear or use a Host.Local.FindSingle call and specify the timeout there.
I recommend going through the first few chapters of the Ranorex User Guide

Regards,
Alex
Ranorex Team