Reputation: 773
I'm running some selenium tests on a amazon cloud machine. My web application has a flash area where i'm simulating a keyboard type and click using java robot code (also tried auto it script to simulate user click and type on the flash area) . The code works when i connect to the server using remote desktop and the remote desktop window is active, but when i minimize the remote desktop window, the java robot code does not work?
Robot robot = new Robot();
robot.delay(5000);
robot.mouseMove(400, 400);
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.delay(2000);
robot.keyPress(KeyEvent.VK_H);
robot.keyPress(KeyEvent.VK_I);
robot.keyPress(KeyEvent.VK_SPACE);
robot.keyPress(KeyEvent.VK_B);
robot.keyPress(KeyEvent.VK_U);
robot.keyPress(KeyEvent.VK_D);
robot.keyPress(KeyEvent.VK_D);
robot.keyPress(KeyEvent.VK_Y);
Upvotes: 3
Views: 3339
Reputation: 627
Thanks, Daniel,
This resolved the issue we had while running a Synthetic Scenario where we need to use Robot Framework to perform some mouse clicks while the RDP Session is minimized.
Best Regards, Buddhika.
Germain UX: Custom Insights, Alerts, and Automation platform to improve User Experience
Upvotes: 0
Reputation: 11
Issue is not with the scripts, but with the host machine's GUI settings for remote machine. To fix this, perform the following steps on the computer from which you are connecting to a remote workstation :
Run the regedit.exe tool.
Find the registry key HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client.
Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.
Now find the registry key HKEY_CURRENT_USER\Software\Wow6432Node\Microsoft\Terminal Server Client. Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.
Close the regedit.exe tool.
Run the regedit.exe tool.
Find the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client.
Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.
Find the registry key HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Terminal Server Client. Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.
Close the regedit.exe tool.
Now when you minimize the Remote Desktop Connection window on your computer, this will not affect the remote computer’s GUI and the GUI will be available to your interactive tasks.
Upvotes: 1
Reputation: 1
I installed UltraVNC Server and connected using VNC client. The problem is not observed and the robot works even after disconnecting. Below is the exact steps:
Upvotes: 0