Page 1 of 1

Warning about mouse actions outside element boundary

Posted: Thu Aug 31, 2017 1:11 pm
by Stub
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?

Re: Warning about mouse actions outside element boundary

Posted: Fri Sep 01, 2017 12:17 pm
by RobinHood42
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
Cheers,
Robin 8)

Re: Warning about mouse actions outside element boundary

Posted: Wed Sep 13, 2017 3:14 pm
by Stub
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.