Hi,
This is Balaji. I am using Ranorex 1.5 licensed version. I face inconsistent issue in using Ranorex. In my application I have automated, I need to input values into an edit box. Our application works on multiple Office versions. When we use same piece of code to input text into edit controls, it works inconsistently. But when I debug the same piece of code it works. Does anybody face inconsistent results with Ranorex?
Ranorex not interacting with controls consistently
-
- Posts: 24
- Joined: Tue Apr 14, 2009 12:29 pm
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
This could be a focus problem. Try to focus the element:
or the control first:
Jenö
Ranorex Team
Code: Select all
element.Select(Selection.TakeFocus);
Code: Select all
control.Focus();
element.Select(Selection.TakeFocus);
Ranorex Team
-
- Posts: 24
- Joined: Tue Apr 14, 2009 12:29 pm
I have tried that too. When I run the test case individually it works fine. When I run 100+ test cases it does not work. Moreover we have put this functionality in common function. 2 test cases use this common function.
I tried identifying the OK push button by control as well as element. But it did not help us.
I tried identifying the OK push button by control as well as element. But it did not help us.
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
If it usually works, but seldom does not, this could be a timing problem. How do you select the edit box? The best way is to click into the edit box using the mouse. You could also try to wait some time before performing the keyboard input.
By the way, could you post the code you use to send the keyboard input? Please, don't use Control.SendKeys, but the Application.SendKeys method.
Regards,
Alex
Ranorex Support Team
By the way, could you post the code you use to send the keyboard input? Please, don't use Control.SendKeys, but the Application.SendKeys method.
Regards,
Alex
Ranorex Support Team