Action spot outside the area of repo element?

Ask general questions here.
Posts: 68
Joined: Wed Jun 29, 2016 12:19 pm
Location: Frankfurt, Germany

Action spot outside the area of repo element?

Post by dugovic.milan » Thu Feb 16, 2017 9: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
Posts: 443
Joined: Fri Jul 15, 2016 12:35 pm

Re: Action spot outside the area of repo element?

Post by Stub » Thu Feb 16, 2017 11:35 am

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: 12169
Joined: Fri Jul 07, 2006 3:30 pm
Location: Houston, Texas, USA

Re: Action spot outside the area of repo element?

Post by Support Team » Fri Feb 17, 2017 1: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.
Those coordinates can be used as the action spot for the click action.
As a consequence, the mouse click is performed outside of the UI element relative to this element.
I hope this information will help you.

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