Clicking an element using coordinates not working in user code module

Ask general questions here.
Sandeep1632
Posts: 13
Joined: Tue Apr 02, 2019 8:42 am

Clicking an element using coordinates not working in user code module

Post by Sandeep1632 » Tue Jun 09, 2020 4:00 pm

Hi,

We are trying to click an element using the Click() method using coordinates. But these coordinates are not consistent and click operation is failing when we are running the same test cases in different machines.
Attached is the screenshot and snapshot of the element.
The highlighted part in the screenshot is treated as single element when I tracked and my requirement is click on the drop down icon.
Could some one suggest if there is any other way where I can resolve this.

Thanks in Advance!

Regards,
Sandeep
You do not have the required permissions to view the files attached to this post.

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

Re: Clicking an element using coordinates not working in user code module

Post by odklizec » Wed Jun 10, 2020 6:28 am

Hi,

Well, I think that in this particular case, you best hope lies in a combination of GDI Capture and/or image-based click action.

At first, explore the possibility of expanding the combo another way than just clicking the expand button (e.g. double click directly to combo, sending a shortcut key to combo, etc...). If there is no such possibility, then you will have to try something else.

Add the list (or its parent element(s)) to GDI Capture list. If you can identify individual combo/list elements using GDI Capture RawTexts, you should be able to create an xpath to uniquely identify the problematic list item. And then you should be able to create image-based action for "expand" button, belonging to given list row/item.
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