Hi
I use Ranorex 7.1.2 and have the following problem.
I have a winforms application which uses devexpress menu items. When I am doing an instant tracking for the first time on the menu, everything is just fine.
If I close the menu, reopen it and to a new instant tracking, the menu items in the dropdown are marked as invalid
It must be a problem in the application under test, because restarting the Ranorex Spy does not solve the problem.
I also can't save a snapshot, because the invalid elements are leading to an error.
What exactly happens when an item is invalid?
Regards Andreas
invalid Item
-
- Posts: 36
- Joined: Mon Sep 20, 2010 10:59 am
invalid Item
You do not have the required permissions to view the files attached to this post.
Re: invalid Item
Hi,
Usually, this happens if the context menu (or for example combo box) is collapsed and its content is unloaded from memory. It's a normal behavior. A very good explanation, when an element becomes invalid, is here:
https://www.ranorex.com/forum/in-what-s ... tml#p44670
If you need to save the snapshot for such problematic element, the best way (to my knowledge) is doing it via recording/code module. Simply add actions leading to opening the menu in question, then add "Log Message" action with parameter Snapshot. This way you can save the snapshot without any additional mouse/keyboard interaction, which may cause disappearance of the menu. Hope this helps?
Usually, this happens if the context menu (or for example combo box) is collapsed and its content is unloaded from memory. It's a normal behavior. A very good explanation, when an element becomes invalid, is here:
https://www.ranorex.com/forum/in-what-s ... tml#p44670
If you need to save the snapshot for such problematic element, the best way (to my knowledge) is doing it via recording/code module. Simply add actions leading to opening the menu in question, then add "Log Message" action with parameter Snapshot. This way you can save the snapshot without any additional mouse/keyboard interaction, which may cause disappearance of the menu. Hope this helps?
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
-
- Posts: 36
- Joined: Mon Sep 20, 2010 10:59 am
Re: invalid Item
Hi,
Thank you for your answer. I read the thread you provided and I agree that the elements of the context menu are going invalid if the popup will be closed.
My problem now is, that when I reopen the menu and refresh the tree in Ranorex Spy, the elements are staying invalid. Even when I close Ranorex Spy and reopen it. I think there must something be cached, not by Ranorex Spy but maybe in UIAutomation or DevExpress components?
Thank you for your answer. I read the thread you provided and I agree that the elements of the context menu are going invalid if the popup will be closed.
My problem now is, that when I reopen the menu and refresh the tree in Ranorex Spy, the elements are staying invalid. Even when I close Ranorex Spy and reopen it. I think there must something be cached, not by Ranorex Spy but maybe in UIAutomation or DevExpress components?
Re: invalid Item
Hi andreas.tastler,
Are the elements still invalid if you track them again after re-opening the spy?
In order to track those elements, you can do the following:
1. Click on the Track button in Ranorex Spy
2. Press and hold F12 key
2. Click on the combobox to expand it and make the MenuItems visible
3. Release the F12 key in order to track the elements.
Please let us know, if the elements are still invalid afterwards.
regards,
qwertzu
Are the elements still invalid if you track them again after re-opening the spy?
In order to track those elements, you can do the following:
1. Click on the Track button in Ranorex Spy
2. Press and hold F12 key
2. Click on the combobox to expand it and make the MenuItems visible
3. Release the F12 key in order to track the elements.
Please let us know, if the elements are still invalid afterwards.
regards,
qwertzu
-
- Posts: 36
- Joined: Mon Sep 20, 2010 10:59 am
Re: invalid Item
Hi qwertzu
Yes, the elements are still invalid after re-opening spy. Only if I re-opening the AUT they will be valid again.
I did the steps you suggested, the elements are still invalid. Now I can navigate to the elements, but this was previously possible by using the Ctrl+LWin Shortcut.
However I managed the problem. Even if the elements are invalid and the RxPath will not be displayed in Spy, the elements will be found at runtime. I entered the path manually in the items repository and the menu can be handled by the ranorex runtime!
Thank you for your help.
Regards
Andreas
Yes, the elements are still invalid after re-opening spy. Only if I re-opening the AUT they will be valid again.
I did the steps you suggested, the elements are still invalid. Now I can navigate to the elements, but this was previously possible by using the Ctrl+LWin Shortcut.
However I managed the problem. Even if the elements are invalid and the RxPath will not be displayed in Spy, the elements will be found at runtime. I entered the path manually in the items repository and the menu can be handled by the ranorex runtime!
Thank you for your help.
Regards
Andreas