How to right click on any element using co-ordinates

Ask general questions here.
premravi
Posts: 11
Joined: Tue Jan 08, 2019 1:55 pm

How to right click on any element using co-ordinates

Post by premravi » Wed Jan 30, 2019 11:16 am

Hi,

I got stuck at a point wherein I am not able to identify the element on which I have to right click

lease help me to understand how can I identify an element using coordinates and perform right click on it?

Regards
Ravindra

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4421
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to right click on any element using co-ordinates

Post by odklizec » Wed Jan 30, 2019 12:21 pm

Hi,

Please upload a Ranorex snapshot (NOT screenshot) of the problematic app. Coordinate-based automation will not "identify" the element. Basically, the test simply performs desired action at defined position. There is no element identification performed at all. So if the element is not there (at defined position), Ranorex may perform the action on completely unrelated element, located under mouse.

BTW, have you tried the GDI Capture approach? It may help with element identification, using RAW texts, extracted from UI elements. And finally, image based automation may be helpful too. It's definitely better option, than coordinate-based automation ;)
Pavel Kudrys
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

premravi
Posts: 11
Joined: Tue Jan 08, 2019 1:55 pm

Re: How to right click on any element using co-ordinates

Post by premravi » Wed Jan 30, 2019 12:45 pm

Hi,

I got the GDI capture settings in the Settings window

On opening it is asking for "Process Name" and "Window Class Name"

What values do I have to pass here ?

Please suggest

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4421
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to right click on any element using co-ordinates

Post by odklizec » Wed Jan 30, 2019 1:25 pm

Hi,

Please check the GDI Capture Configuration section of User Guide. In Spy, you should right click nearest ancestor/parent container (from the element you would like to use) and select Add class name to GDI capture list. If there is no such context menu option available, you should go up in UI tree and check another ancestor element, if it contains such option.
Pavel Kudrys
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