Making a menu item click data driven - KeePass sample?

Ask general questions here.
Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Making a menu item click data driven - KeePass sample?

Post by Fergal » Thu Aug 14, 2014 10:11 am

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!

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

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

Post by krstcs » Thu Aug 14, 2014 1:31 pm

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.
Shortcuts usually aren't...

Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

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

Post by Fergal » Thu Aug 14, 2014 3:25 pm

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.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

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

Post by krstcs » Thu Aug 14, 2014 3:29 pm

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.
Shortcuts usually aren't...

Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

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

Post by Fergal » Thu Aug 14, 2014 4:42 pm

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!

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

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

Post by krstcs » Thu Aug 14, 2014 4:59 pm

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.
Shortcuts usually aren't...

Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

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

Post by Fergal » Fri Aug 15, 2014 9:05 am

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!

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

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

Post by krstcs » Fri Aug 15, 2014 2:59 pm

Use Instant Tracking in Spy - 'Ctrl-LWin' with the mouse cursor over the menu item.
Shortcuts usually aren't...

Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

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

Post by Fergal » Tue Aug 19, 2014 11:19 am

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?

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

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

Post by krstcs » Tue Aug 19, 2014 1:20 pm

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.
Shortcuts usually aren't...

Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

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

Post by Fergal » Wed Aug 20, 2014 9:20 am

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?