Test is stopped automatically after close the windows remote desktop connection

Hey there!

I’m using the default “Remote desktop connection” of Windows to access the PC on Lab
Running the test suite is ok, but after

  1. close connection (close remote desktop connection). The test is stopped automatically

=============== ROOT CAUSE =====================
Caused by: org.openqa.selenium.WebDriverException: Access is denied (WARNING: The server did not provide any stacktrace information)

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html

  1. Minimize the “Remote desktop connection”, the test is stopped automatically

Jul 16, 2021 3:28:59 PM org.openqa.selenium.interactions.Actions moveToElement
INFO: When using the W3C Action commands, offsets are from the center of element
2021-07-16 15:29:30.648 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Expected condition failed: waiting for com.kms.katalon.core.windows.keyword.helper.WindowsActionHelper$1@18460128 (tried for 30 second(s) with 50 milliseconds interval) (Root cause: org.openqa.selenium.TimeoutException: Expected condition failed: waiting for com.kms.katalon.core.windows.keyword.helper.WindowsActionHelper$1@18460128 (tried for 30 second(s) with 50 milliseconds interval)
at org.openqa.selenium.support.ui.FluentWait.timeoutException(FluentWait.java:304)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:272)

Note:

  • I also set up the “session time limit” to enable (never) on “Local group policy”
  • Run the Katalon as administrator,
  • If I keep the Remote desktop connection on top of my local PC, the test is running fine

Could anyone help me, thanks!

Hello there,
Anyone has any idea for this issue, thanks!

Hi @taynguyen,

This is an issue of Remote Desktop client. Please try this workaround in this document of Microsoft: https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/troubleshoot/rdp-client-disconnects-cannot-reconnect-same-session

1 Like

yay! it works, thank @duyluong a lot
PS: for quick we can search by “gpedit.msc” then folow the picture below as an e.g, thanks!