Page 1 of 1

How to select the item from context menu

Posted: Tue Jan 06, 2015 10:11 am
by subodh4u7
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"

Re: How to select the item from context menu

Posted: Wed Jan 07, 2015 5:00 pm
by Support Team
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

Re: How to select the item from context menu

Posted: Thu Jan 08, 2015 4:58 am
by subodh4u7
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

Re: How to select the item from context menu

Posted: Fri Jan 09, 2015 2:22 pm
by Support Team
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
Press F12 Key on your keyboard.
Navigate to the context menu in your application (I use Microsoft Paint for this example).
Paint.jpg
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
Please let me know if this also doesn't work.

Regards,
Bernhard

Re: How to select the item from context menu

Posted: Fri Jan 09, 2015 5:52 pm
by subodh4u7
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.

Re: How to select the item from context menu

Posted: Mon Jan 12, 2015 1:17 pm
by Support Team
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