Action Spot - Relative to Right Edge

Experiences, small talk, and other automation gossip.
Posts: 3
Joined: Mon Oct 10, 2016 3:16 pm

Action Spot - Relative to Right Edge

Post by markhint22 » Thu Aug 17, 2017 2:58 pm

I am trying to move a slider in a side pane of a chrome window. The slider is not recognized so I'm trying to grab the right side of the window a few pixels just in from the right side and move it down. I am able to do this using pixels but I want to make sure it is being grabbed even if the window is adjusted. I tried using Location.UppertRight and Location.CenterRight to grab the slider but it is missing.
I am able to use a pixel location to move it but it misses sometimes so i would like to say location = (Right Edge - 4 pixels, 53 pixels ). Does anyone have a simple solution to this issue? I was hoping i could possibly use a pixel reference for y and a proportional reference for x but it doesn't look like this is supported.

User avatar
Posts: 369
Joined: Fri Jul 15, 2016 1:35 pm

Re: Action Spot - Relative to Right Edge

Post by Stub » Fri Aug 18, 2017 8:20 am

Your mention of Action Spot makes me think you may be using recordings? I don't use recordings personally, but in code I've frequently taken the ClientRectangle of the Ranorex.Element and calculated a coordinate within the area to get it to precisely where I need. You may be able to call a bit of User Code to achieve the same result though?