How to select the item from context menu

Ranorex Spy, Recorder, and Studio.
User avatar
subodh4u7
Posts: 68
Joined: Tue Jan 06, 2015 8:26 am

How to select the item from context menu

Post by subodh4u7 » Tue Jan 06, 2015 10:11 am

Dear All,

I am having one scenario which i am unable to do so...Need you expertise to help me :)
1. RMB click on a row
- A context menu appears and this one I am able to handle since spy is able to identify and able to add to the repository.

2. There is one item (e.g. Fruits) on the above context menu which needs to be selected
- This one also I am able to handle since spy is able to identify and able to add to the repository.

3. There is another context menu when we click on the Fruits and its a scrollable list in which I need to select one.
- The element from this context menu is able identified by spy but when i am trying to add to the repository the message i get is "The item is no longer valid"

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to select the item from context menu

Post by Support Team » Wed Jan 07, 2015 5:00 pm

Hi subodh4u7,

you can use the "Track ..." button in the repository directly in order to add the element to the repository.
  • Click the Track button
  • Press and hold the F12 button
  • Navigate to the element within the context menu
  • Release the F12 button
  • Cklick on the element
The element sholuld be added to the repository after doning the steps above.

Regards,
Bernhard
.
Image

User avatar
subodh4u7
Posts: 68
Joined: Tue Jan 06, 2015 8:26 am

Re: How to select the item from context menu

Post by subodh4u7 » Thu Jan 08, 2015 4:58 am

Thanks Bernhard,
Still I am facing issue in adding to repository as you have suggested. as you can see in the screenshot red boundary across the first context menu but not around the 2nd one. Even though sometimes it appears in the repository but while adding doesn't give proper meaning. something like Form0 >>
As my context menu is scrollable, so some of the elements are not visible and hence need to scroll. The items which are visible, it works fine but the problem lies when element is not visible for which need to scroll. So how can i handle this scenario.

I have attached screenshot.
Suppose I want to select the Pomegranate from the context menu which is not visible. How would i traverse and find the same in the context menu. I am not able to add the 2nd context menu as whole so that I could get all elements into the list.
Please help me if possible with code.

Support Team wrote:Hi subodh4u7,

you can use the "Track ..." button in the repository directly in order to add the element to the repository.
  • Click the Track button
  • Press and hold the F12 button
  • Navigate to the element within the context menu
  • Release the F12 button
  • Cklick on the element
The element sholuld be added to the repository after doning the steps above.

Regards,
Bernhard
Attachments
Ranorex_Identification.jpg
Ranorex_Identification.jpg (251.38 KiB) Viewed 1758 times
Ranorex.jpg
Please find the screenshot for more details
Ranorex.jpg (60.12 KiB) Viewed 1763 times
Regards,
Subodh

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to select the item from context menu

Post by Support Team » Fri Jan 09, 2015 2:22 pm

Hi subodh4u7,

Sorry, it seems I was not clear enough. I try to explain it in a better way.
Open the Repositoy in Ranorex Studio and click the Track button.
RanorexStudio.jpg
RanorexStudio.jpg (72.47 KiB) Viewed 1748 times
Press F12 Key on your keyboard.
Navigate to the context menu in your application (I use Microsoft Paint for this example).
Paint.jpg
Paint.jpg (98.44 KiB) Viewed 1748 times
Release the F12 key and wait until the red border appears on the item in the contex menu and do a mouse click.

The element should be added to your repository after doing so.
RanorexStudioRepoItem.jpg
RanorexStudioRepoItem.jpg (129.33 KiB) Viewed 1748 times
Please let me know if this also doesn't work.

Regards,
Bernhard
.
Image

User avatar
subodh4u7
Posts: 68
Joined: Tue Jan 06, 2015 8:26 am

Re: How to select the item from context menu

Post by subodh4u7 » Fri Jan 09, 2015 5:52 pm

Thanks a lot again.
I totally understood what you have explained earlier as well.

In my application, when I am following up the your instruction, the elements are captured as my previous screenshot where you see big list in the left hand side. The problem is I am not able to add to the repository as shown in the right hand side. Since other context menu is scrollable I will have to check the particular element is visible or not, if not then need to scroll up or down to make it visible and then select the item. so for scrolling i need to get another context menu as list or something where i can traverse and do scrolling and check whether my element is visible or not.

Hope this time I am able to put my question clearly to make you understand so that you can guide me properly.
Regards,
Subodh

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to select the item from context menu

Post by Support Team » Mon Jan 12, 2015 1:17 pm

Hi subodh4u7,

Thank you for the explanation. Is it possible to get your application in order to analyze the issue on my machine?
Additionally may I ask which version of Ranorex are you using?

Regards,
Bernhard
.
Image