Page 1 of 1

Element shows as outside visible desktop

Posted: Wed Mar 22, 2017 9:49 pm
by bcasler
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.

Re: Element shows as outside visible desktop

Posted: Thu Mar 23, 2017 2:45 pm
by asdf
Hi bcasler,

Have you already tried to select the ListItem through an InvokeAction, instead of a mouse click?
Invoke.png
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.

Re: Element shows as outside visible desktop

Posted: Tue Mar 28, 2017 7:36 pm
by bcasler
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.

Re: Element shows as outside visible desktop

Posted: Thu Mar 30, 2017 2:09 pm
by asdf
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.