Element shows as outside visible desktop

Ranorex Spy, Recorder, and Studio.
bcasler
Posts: 2
Joined: Wed Mar 22, 2017 9:24 pm

Element shows as outside visible desktop

Post by bcasler » Wed Mar 22, 2017 9:49 pm

Good afternoon.

OS: Windows Server 2012 R2 x64
Ranorex: 6.1.0

I'm having an issue with Ranorex Studio where tracking of an element works when running the module itself, but when the module is used in a test case, it throws the following error:

Failed to move to location 'Center' within element '{ListItem:Deny}'.
The pointer cannot be moved to point '{X=-1073741825,Y=-1073741825}' since it is outside of the visible desktop. The list item it's trying to click is on a modal window that pops up on the screen after clicking another link.

This module is a slightly modified version of two other modules that have no issue with this selection (the main difference between the two is that they point at different items in the list).

Here's the code for the action:
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Modal_Windows.Approval_Setting.Approval_Setting.List.Deny' at Center.", repo.Modal_Windows.Approval_Setting.Approval_Setting.List.DenyInfo, new RecordItemIndex(5));
            repo.Modal_Windows.Approval_Setting.Approval_Setting.List.Deny.Click();
            Delay.Milliseconds(200);
I attached a snapshot of the modal window. Let me know if I also need to upload a snapshot of the window where this window is opened from.
Attachments
deny_snapshot_bcasler.rxsnp
(80.03 KiB) Downloaded 42 times

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

Re: Element shows as outside visible desktop

Post by asdf » Thu Mar 23, 2017 2:45 pm

Hi bcasler,

Have you already tried to select the ListItem through an InvokeAction, instead of a mouse click?
Invoke.png
Invoke.png (1.71 KiB) Viewed 701 times
If this doesn't help, I would suggest turning of the folder caching of this certain element. Therefore, you have to go to the folder of your element and navigate to its properties. There you have to set "Use Cache" to false. Please make sure that you do so for all folders of your ListItem.

Hope this helps.

bcasler
Posts: 2
Joined: Wed Mar 22, 2017 9:24 pm

Re: Element shows as outside visible desktop

Post by bcasler » Tue Mar 28, 2017 7:36 pm

It looks like the caching setting was the issue. Thank you, asdf! Any idea why this would happen on one module but not another? I have 2 other modules with essentially the same steps (just choosing a different list item). They were all within the same folder that had caching enabled.

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

Re: Element shows as outside visible desktop

Post by asdf » Thu Mar 30, 2017 2:09 pm

Hi bcasler,

I'm glad that this solved the problem. Unfortunately, I'm not sure why the other modules work as expected. I just had a similar issue in the past and remembered that turning of folder caching worked in my case.