Page 1 of 1

Pop ups cause Ranorex to fail to find controls

Posted: Fri Sep 24, 2010 5:34 pm
by Thor222
I have a flex app that I'm testing. One control we have is a tree grid. Right clicking on a tree item brings up a context menu. Choosing a context menu item brings up a windows form dialog.

Problem: I can navigate to the windows form this way and close the dialog, however after closing the dialog if I attempt to navigate the tree again and perform the same operations on a different tree item, the mouse is not moving to the expected location.

I can't seem to figure out out to reset things so that I recover from this. Interestingly, at the point of failure I have run the spy tool. The spy is able to identify repository items with the correct position on the screen.

Also, I have turned off respository caching.

Re: Pop ups cause Ranorex to fail to find controls

Posted: Mon Sep 27, 2010 1:32 pm
by Support Team
Hi,

Would it be possible to send us the exact error message?
My read is, the timeout to search for the element after closing the Pop-Up is to short. Have you tried to increase the timeout of the tree. If you are using a repository, please increase the timeout of the corresponding item. When you searching for the item in code, please use the overload of the Find() method with parameter "Duration". You can also change the DefaultSearchTimeout for the Adapter class. Therefore please take a look to following documentation http://www.ranorex.com/Documentation/Ra ... imeout.htm

Regards,
Peter
Ranorex Team

Re: Pop ups cause Ranorex to fail to find controls

Posted: Tue Sep 28, 2010 8:21 pm
by Thor222
There's no error message, it's just that the mouse moves to the wrong location. The popup dialog has a text field, and the first time the test executes it finds the field just fine. However, after adding a 2nd new item to the tree and r-click on the new item to pop-up the dialog again, it's not moving the mouse to the right location of the text field (it' looks like Ranorex sees the popup in the upper left corner of the screen as opposed to roughly in the center of the screen).

Here's something interesting: I created a similar test using the recorder and that's working just fine.

I notice in the .cs file of the recording, that Ranorex is adding the test-generated tree items to the repository. I've been trying to not add dynamically generated elements to the repository, but rather search for them using a RanorexPath expression. This way I keep my respository small and not cluttered with test artifacts. Am I going down the wrong path? Should I be dynamically adding and deleting elements from the repository as part of the test?

Re: Pop ups cause Ranorex to fail to find controls

Posted: Thu Sep 30, 2010 9:50 am
by Support Team
Hi,

Please try to disable folder caching in the repository. Maybe this could solve the problem.
http://www.ranorex.com/support/user-gui ... html#c2076

Regards,
Peter
Ranorex Team

Re: Pop ups cause Ranorex to fail to find controls

Posted: Wed Oct 27, 2010 8:23 pm
by sundarpn
Thor222,
We face a very similar issue to what the original post says.

1. Our Script logs in to our application and goes through a work-flow. On a specific screen, It clicks/selects a specific control (a tab page) using repository based path. No issues here.

2. Script does some other things as it continues through the work-flow. Some other windows open & close on top. Then returns back to the same screen and tries to get the same control using the same repository based path (as in step 1). It fails to find that tab page control and throws an 'Element Not Found' exception.

3. At this point, using the Ranorex Spy we spy for that control using the same repository based path and the Spy finds it!.

This issue is not 100% reproducible. But fails most of the time. (and this is not restricted to a TabPage, its true for many adapters). And yes, we have tried disabling the cache, increasing timeouts, even eliminating the repository based path and putting in the actual XPath string into our code. (we are using vs2010 & Ranorex integration and code our scripts.)

We think that issue started after we upgraded to version 2.3.4

Re: Pop ups cause Ranorex to fail to find controls

Posted: Thu Oct 28, 2010 1:25 pm
by Support Team
Hi,

Please could you post us some additional information:
  • Which technology is used for your unit under test?
  • Please post a Ranorex snapshot of the expected control.
  • Please also post us the RxPath for this element and maybe the code, where you perform your actions.
Thanks in advance.

Regards,
Peter
Ranorex Team

Re: Pop ups cause Ranorex to fail to find controls

Posted: Thu Oct 28, 2010 4:24 pm
by sundarpn
Hello Peter,

We have raised a support call. My colleague James Miller is working with a Peter Gradnitzer. I suppose that is you? Looking at your sig in the post below :D

Thx.

Re: Pop ups cause Ranorex to fail to find controls

Posted: Thu Oct 28, 2010 4:34 pm
by Support Team
Jup, you are right, that's me. I already sent him a few question, because at the moment we have no clue which could cause this problem.

Regards,
Peter
Ranorex Team