Clicking certain area of an object on different screen sizes
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Clicking certain area of an object on different screen sizes
I am encountering an issue where an object is clickable (to bring up a menu) but only in the upper right hand corner of it. I cannot seem to map just the clickable area so when I do a test, I need to include coordinates of the object so that the correct area is clicked, thus opening the menu for additional items to be clicked.
This works fine for me but when run on a co-worker's computer the test fails because our screen sizes are different so the object is not clicked in the right location.
Is there a way around this?
Thanks!
Solved! Go to Solution.
- Labels:
-
Keyword Tests
-
Object Recognition
-
Recording
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
> "There was an attempt to perform an action a point, which beyond the screen"
This means that coordinates were calculated incorrectly 🙂
Stop script on the breakpoint at the line with the call to .Click() method and check that calculated coordinates are somewhere within the area with the ellipsis button.
The general idea is to get coordinates of the top-right corner of the control that contains ellipsis button and then shift down and to the left so that click was performed over the button.
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you say check the calculated coordinates, do you mean within the Locals debugger? And find the object in question: panelDevicedatacontainer?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> do you mean [...]
Yes for both your questions.
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Alex,
Please see attached picture.
Am I looking for height and width of the object in question? I see clientHeight = 52 and clientWidth = 155 for page.panelDevicecardcontainer.panelDevicedatacontainer.
ClientTop is 0 though so doing Top - 5 would be negative. Is that what's causing the above error?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Alternatively, is there a way to select the button via the HTML class name?
See attached picture.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This was solved by ensuring the project setting "Use XPath and CSS selectors for web objects" is selected. When it was selected, the object within an object could be mapped and thus clicked

- « Previous
-
- 1
- 2
- Next »
- « Previous
-
- 1
- 2
- Next »