Warning about mouse actions outside element boundary

Ranorex Spy, Recorder, and Studio.
User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Warning about mouse actions outside element boundary

Post by Stub » Thu Aug 31, 2017 1:11 pm

I'm converting our Ranorex v6.2.1 tests to Ranorex v7.1.1 and resolving any issues I find. I've started seeing a new warning appear in my test logs and I'm looking into fixing the issue to eliminate this warning. It's a new feature listed in the v7.0.0 release notes
General changes/Features

Added a warning when performing mouse/pointer actions outside an element's boundaries caused by a relative location
I've mentioned here that I calculate a -ve coordinate so I can click on the checkbox portion of a TreeItem to change its Checked state. I can't set Checked directly:
Setting attribute 'checked' failed on element '{TreeItem:Site B}'.
The operation is not supported.
Is there a better way of changing the Checked state of a TreeItem that I'm missing?
Is there a way of suppressing this warning?
Or should I just calculate a coordinate relative to the Tree control rather than the TreeItem?

User avatar
RobinHood42
Posts: 239
Joined: Fri Jan 09, 2015 3:24 pm

Re: Warning about mouse actions outside element boundary

Post by RobinHood42 » Fri Sep 01, 2017 12:17 pm

Hi Stub,

If the element can't be tracked then the coordination based click is a good alternative. To disable the out-of-bounds warning simply set the following property to 'true':
DisableBoundsWarning.png
DisableBoundsWarning.png (14.07 KiB) Viewed 577 times
Cheers,
Robin 8)

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

Re: Warning about mouse actions outside element boundary

Post by Stub » Wed Sep 13, 2017 3:14 pm

While looking into another issue I just noticed that there is now an API ClickWithoutBoundsCheck. Also DoubleClickWithoutBoundsCheck. I can't say I have noticed those until today! D'oh!!! They look like the same thing as you highlighted, RobinHood42.

At the time I raised this query I ended up rewriting my code in terms of the parent item to remove the warning. Now I'm bashing my head off my desk for not noticing this additional Click API sooner.