"Outside of the visible desktop" error; but it's not.

Ask general questions here.
mzydorczyk
Posts: 10
Joined: Wed Oct 19, 2016 7:09 pm

"Outside of the visible desktop" error; but it's not.

Post by mzydorczyk » Wed Oct 19, 2016 9:41 pm

Running on Windows server 2012r2
Ranorex 6.1.0

OK this is a strange one I'm banging my head against.

In my test suite I begin with a [setup] section and do some things in user code with an API to a 3rd party application which allows me to test the plugin I need to test.

After the setup section I have my test cases. Here is the jist of them:

Case 1: Open plugin window, validate it opens.
Case 2: Open window in plugin, validate that window opens, close that window, close the plugin window
Case 3: Open the plugin window, Open same window in plugin (as in case 2), do other stuff...

The problem is that when the plugin window opens in case 3, ranorex somehow has no idea how to open the windows in the second step in the case. I get the error:

"Failed to move to location 'Center' within element '{Button:QuickTicketingWindow_CreateTicketButton}'.
The pointer cannot be moved to point '{X=-1073741825,Y=-1073741825}' since it is outside of the visible desktop. "

Now when I run the module alone, whose only job is to click to open the window in the plugin window, it works.

Why would ranorex lose track of the mouse/cursor only when running the suite? Looking a couple other posts, people asked the poster if the property visible = true, it does in my case. Also the window is not on any other screen. It shows up right where it opened in case 2.

Please let me know if I can provide any more details. Thank you.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: "Outside of the visible desktop" error; but it's not.

Post by odklizec » Fri Oct 21, 2016 8:44 am

Hi,

My guess is that Ranorex attempts to click the button too soon, when the xpath is found, but element/GUI is not fully loaded? Either this, or there is a problem with the xpath.

At first, please add a small delay before the click action. Eventually, if it's a web-based app, add Invoke Action - WaitForDocumentLoaded method, which pauses test execution until the page is loaded. Add this right before the click action. This should make sure Ranorex clicks the element only after the element/page is fully loaded.

Additionally, test the used xpath with spy, both before and after case 3 (right before click action). Just to make sure there is just one element available for given xpath. If there are multiple elements available, Ranorex attempts to clicks the first one found, which may not necessarily be the correct one ;)

Another possibility is to use PerformClick instead of click. The difference is that the PerformClick does not move/use mouse to perform click. It clicks the element programmatically. The downside of using PerformClick is that it may not invoke some critical mouse-related events (e.g. on mouse click), so it should be used with caution and only when there is really no other option. You see, it's not exactly "user performed" action so it does not simulate real user ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
heron
Posts: 1
Joined: Thu Jan 29, 2015 12:45 pm

Re: "Outside of the visible desktop" error; but it's not.

Post by heron » Sat Nov 05, 2016 7:58 am

Thanks odklizec

Andrea
Posts: 12
Joined: Fri Dec 16, 2016 1:48 pm

Re: "Outside of the visible desktop" error; but it's not.

Post by Andrea » Thu Apr 20, 2017 3:41 pm

Hi,

I noticed a sort of this for my automation as well.

If execute as recording (pressing several buttons) everything is green. But when it is executed the buttons cannot be found.
I get always this message inside the report:
Failed to move to location 'Center' within element '{Button:OK}'.
The pointer cannot be moved to point '{X=-1073741825,Y=-1073741825}' since it is outside of the visible desktop.

But indeed the element is visible already before the test run starts and also during the execution (I checked visually during test execution). And I doubt that the fault is on the path since it can be executed as recording. I tried with the recommended delay, but still get the error.
Using Ranorex 6.2.0

Any ideas on this?

Best,
Andrea

McTurtle
Posts: 297
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: "Outside of the visible desktop" error; but it's not.

Post by McTurtle » Fri Apr 21, 2017 2:03 pm

Hello Andrea,

Is your application web-based? Have you also tried with the Invoke Action "WaitForDocumentLoaded()"?

Simply drag and drop the dom object into the action table and chose "Invoke Action"->"WaitForDocumentLoaded()".

If this does not help and it is not a web-based app, then we will need more information in order to help you. It would be best, if you could add a "Create Snapshot" action into the action table right before the action that results in the error. After the failed report is displayed create a compressed Ranorex Report and upload it with your next post. Instructions on this can be found here: http://www.ranorex.com/support/user-gui ... eport.html

By compressing a report that contains a snapshot, the snapshot will be compressed into the report and you don't need to upload it individually.
Snapshot.png
The report should include such an "Open Snapshot" line.

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

Andrea
Posts: 12
Joined: Fri Dec 16, 2016 1:48 pm

Re: "Outside of the visible desktop" error; but it's not.

Post by Andrea » Tue Apr 25, 2017 3:18 pm

Hi McTurtle,

Thanks for your input.
It is not a webpage, it is a .net client application. I tried to use Invoke Action "Press()" and "Focus()" but with no success. Pls find attached the required report
You do not have the required permissions to view the files attached to this post.

McTurtle
Posts: 297
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: "Outside of the visible desktop" error; but it's not.

Post by McTurtle » Thu Apr 27, 2017 10:02 am

Hello Andrea,

Thank you for the snapshot.

From the snapshot I can see that the application is not visible to Ranorex at this moment as the form is grayed out.

Could you try to add "EnsureVisible" action before any actions executed in test case "SAMSettingsClearAndClose"? To do this you can drag&drop the form element into the action table and navigate to "Invoke Action"->"EnsureVisible()".
EnsureVisible.png
Please let me know if this helped.

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

Andrea
Posts: 12
Joined: Fri Dec 16, 2016 1:48 pm

Re: "Outside of the visible desktop" error; but it's not.

Post by Andrea » Tue May 09, 2017 1:53 pm

Hi McTurtle,

thanks for your comment. I tried unfortunately without success. But somehow the update to Ranorex 7.0.1 fixed my issue.
Maybe due to the improved WPF recognition?! But anyway, thx for your support, I really appreciate it.

Best,
Andrea

McTurtle
Posts: 297
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: "Outside of the visible desktop" error; but it's not.

Post by McTurtle » Tue May 09, 2017 3:49 pm

Hello Andrea,

The upgrade to the WPF plugin was a major change and it could well be that it resolved your issue. If it was possible for your to upgrade and this resolved the issue, then I am only glad.

Regards,
McTurtle