Page 1 of 1

Making a menu item click data driven - KeePass sample?

Posted: Thu Aug 14, 2014 10:11 am
by Fergal
Referring to this section of Page 24 of the User Guide.

Image

When I try to make this menu item click data driven on KeePass (Ranorex Studio 5.0.3.18203) the "Accessible" options are not displayed in the Path Editor. The options I see are General and MenuItem as shown in the image below:

Image

MenuItem contains options for "checked", "image" and "text"

How can I get those Accessible options displayed?

Alternatively how can I make the menu item selection data driven, without the Accessible options?

Thanks!

Re: Making a menu item click data driven - KeePass sample?

Posted: Thu Aug 14, 2014 1:31 pm
by krstcs
You will not be able to get any specific attributes if the item cannot be found by Ranorex at the time you are editing the properties.

If you look at your second screen shot, in the left pane you will see that all 3 of the elements in the path you are editing are marked with a red X. That means that Ranorex cannot find the elements in question. Without being able to find them it will be very hard to know what attributes are available.

I would recommend that you keep the AUT open when doing any path editing, and it needs to be open to the location of the element you are editing. Also, make sure that the base path of each element that has the red X is correct.

Re: Making a menu item click data driven - KeePass sample?

Posted: Thu Aug 14, 2014 3:25 pm
by Fergal
Thanks for your reply krstcs.
krstcs wrote:...all 3 of the elements in the path you are editing are marked with a red X. That means that Ranorex cannot find the elements in question. Without being able to find them it will be very hard to know what attributes are available.....
Do you know why that is? When creating that test, I tried to follow the steps in the User Guide exactly.

Re: Making a menu item click data driven - KeePass sample?

Posted: Thu Aug 14, 2014 3:29 pm
by krstcs
As I said, my guess would be that you either:

1. Don't have the application under test open and on the correct page, or
2. Your base XPath for the root item is incorrect in some way.

Check those issues and try it again.

Re: Making a menu item click data driven - KeePass sample?

Posted: Thu Aug 14, 2014 4:42 pm
by Fergal
krstcs wrote:...1. Don't have the application under test open and on the correct page....
I recorded the tests initially by recording what I was doing on KeePass and then I went back to the test to make the menu click variable. Hence, the application was open when I recorded the test.

krstcs wrote:...2. Your base XPath for the root item is incorrect in some way....
How can I determine for certain, if that is the issue? If it is the issue, how do I go about fixing it?

Thanks again krstcs!

Re: Making a menu item click data driven - KeePass sample?

Posted: Thu Aug 14, 2014 4:59 pm
by krstcs
I would open Ranorex Spy separately from Studio and track the object you are looking for.

Then, open the path in Studio's repository for editing. Check out the two paths side-by-side and see what the difference is.

Re: Making a menu item click data driven - KeePass sample?

Posted: Fri Aug 15, 2014 9:05 am
by Fergal
Thanks krstcs. The item I am trying to find is a menu item, the menu opens when I click on a button on the KeePass application. The menu closes when I click anywhere else, e.g. on the Track button in Spy, hence I am having difficulty tracking it.

The test in question is an example test from Lesson 3 in the Ranorex User Guide. Ranorex Spy is covered in Lesson 9. Is it really necessary to have a knowledge of Lesson 9, in order to complete an example test from Lesson 3?

Thanks again!

Re: Making a menu item click data driven - KeePass sample?

Posted: Fri Aug 15, 2014 2:59 pm
by krstcs
Use Instant Tracking in Spy - 'Ctrl-LWin' with the mouse cursor over the menu item.

Re: Making a menu item click data driven - KeePass sample?

Posted: Tue Aug 19, 2014 11:19 am
by Fergal
Thanks krstcs!
krstcs wrote:Use Instant Tracking in Spy - 'Ctrl-LWin' with the mouse cursor over the menu item.
I tried that and can locate the element with Spy. Still can't find it when I try to make the menu selection variable. I was working through the user guide page by page, in detail. Now that I can't get that test to work, I'm not sure where to go from here. Any ideas?

Re: Making a menu item click data driven - KeePass sample?

Posted: Tue Aug 19, 2014 1:20 pm
by krstcs
Could you post a Ranorex Snapshot (http://www.ranorex.com/support/user-gui ... files.html) of the element you are trying to find, as well as the path you are trying to use? That might make it easier to see what is wrong.

Re: Making a menu item click data driven - KeePass sample?

Posted: Wed Aug 20, 2014 9:20 am
by Fergal
Thanks krstcs, I tried both options from that link and received the error message below, when I try to save the Snapshot.
An error occurred while saving the snapshot. The selected element is not valid any more.
Just to clarify, is the <SCROLL> key referred to in that lesson, the <ScrLk> key?