Action spot outside the area of repo element?

Ask general questions here.
dugovic.milan
Posts: 68
Joined: Wed Jun 29, 2016 1:19 pm
Location: Frankfurt, Germany
Contact:

Action spot outside the area of repo element?

Post by dugovic.milan » Thu Feb 16, 2017 10:25 am

Hey... does anyone know how to click few pixels in any direction outside the area of graphic element? Or how to use Click/Move action (against no repo element) with respect to the previous step and not to the whole screen resolution? Any ideas? Thanks...
Ranorex Explorer @DVAG
Support my Ranorex Ideas & Improvements
My current approach: Ranorex 9.2.0

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

Re: Action spot outside the area of repo element?

Post by Stub » Thu Feb 16, 2017 12:35 pm

I've been clicking to the left of a treeitem to check a box:

Code: Select all

Ranorex.TreeItem treeitem
treeitem.Click(new Location(-25, treeitem.Element.Size.Height / 2));
I'll need to calculate that offset value at some point but that's working for me at the moment.

My mouse moves have always been calculated in terms of an element with a screen rectangle however. Haven't done any mouse movements relative to where it is currently located.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Action spot outside the area of repo element?

Post by Support Team » Fri Feb 17, 2017 2:19 pm

Hi dugovic.milan,

A coordinate-based mouse click can be performed relative to any UI element. First, I would suggest tracking the UI element, which you want to use for the relative click action. After tracking the element, you can move the mouse to the actual action spot of the click. In Ranorex Spy you will see the coordinates relative to the current element.
mouse_coordinates.png
Those coordinates can be used as the action spot for the click action.
mouse_click_action.png
As a consequence, the mouse click is performed outside of the UI element relative to this element.
mouse_click.png
I hope this information will help you.

Sincerely,
Johannes
You do not have the required permissions to view the files attached to this post.