.Click() issue watching automation via remote desktop
Posted: Thu May 24, 2012 12:51 am
I'm seeing random behavior when using Validate.Exists() and .Click() for various Ranorex adapters in web pages when watching the automation via a remote desktop window.
When I'm NOT using remote desktop and am watching the automation run on the screen connected directly to the machine (Windows 7) that is running the automation directly from Ranorex Studio it works perfectly.
However when I remote desktop to that same machine and start the automation on that same machine using the remote desktop window and watch the automation, it behaves randomly. The code executes a Validate.Exists() for a specific web page adapter such as a button and then calls .Click() on that same adapter. These two calls do not fail in the code (no exception), however even though the .Click() call succeeded the adapter is not actually clicked in the web page (I can see the mouse over the adapter on the page but the .Click() call appears to have done nothing).
I've tried increasing Mouse.DefaultClickTime but I still get this random behavior via remote desktop. Sometimes the .Click() to an adapter actually clicks it but sometimes it doesn't even though .Click() in the code did not fail.
I've also tried adding Ranorex.Delay delays of a couple of seconds before every .Validate and .Click call and it helps but I'm not clear on why I need to do this to accommodate remote desktop running.
What do I need to do to compensate for whatever difference the remote desktop session is making?
When I'm NOT using remote desktop and am watching the automation run on the screen connected directly to the machine (Windows 7) that is running the automation directly from Ranorex Studio it works perfectly.
However when I remote desktop to that same machine and start the automation on that same machine using the remote desktop window and watch the automation, it behaves randomly. The code executes a Validate.Exists() for a specific web page adapter such as a button and then calls .Click() on that same adapter. These two calls do not fail in the code (no exception), however even though the .Click() call succeeded the adapter is not actually clicked in the web page (I can see the mouse over the adapter on the page but the .Click() call appears to have done nothing).
I've tried increasing Mouse.DefaultClickTime but I still get this random behavior via remote desktop. Sometimes the .Click() to an adapter actually clicks it but sometimes it doesn't even though .Click() in the code did not fail.
I've also tried adding Ranorex.Delay delays of a couple of seconds before every .Validate and .Click call and it helps but I'm not clear on why I need to do this to accommodate remote desktop running.
What do I need to do to compensate for whatever difference the remote desktop session is making?