[英]WinAppDriver based automation stops working on windows 10 VM when I close the RDP connection
I am doing all the work remotely on my Windows 10 Virtual Machine (Via RDP).我正在我的 Windows 10 虚拟机(通过 RDP)上远程完成所有工作。 Whenever I am logged in to the server, I can see my automation running fine but when I close my RDP connection, the WinAppDriver can't find the elements on the desktop application and thus it stops working.
每当我登录到服务器时,我都可以看到我的自动化运行良好,但是当我关闭我的 RDP 连接时,WinAppDriver 无法在桌面应用程序上找到元素,因此它停止工作。
How can I solve it?我该如何解决? Please let me know If I am missing something.
如果我遗漏了什么,请告诉我。
Thanks谢谢
When you disconnect the RDP session windows knows it doesn't have the render the gui, so it doesn't.当你断开 RDP session windows 知道它没有渲染 gui,所以它没有。
The trick is to disconnect a different way.诀窍是断开不同的方式。 Terminate your connection from the remote sever with this:
使用以下命令终止与远程服务器的连接:
%windir%\System32\tscon.exe RDP-Tcp#NNN /dest:console %windir%\System32\tscon.exe RDP-Tcp#NNN /dest:console
where RDP-Tcp#NNN is the ID of your current Remote Desktop session, for example, RDP-Tcp#5.其中 RDP-Tcp#NNN 是您当前远程桌面 session 的 ID,例如 RDP-Tcp#5。 You can see it in the Windows Task Manager on the Users tab, in the Session column.
您可以在 Session 列的用户选项卡上的 Windows 任务管理器中看到它。
If you need more info have a look at this site https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/keeping-computer-unlocked.html如果您需要更多信息,请查看此站点https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/keeping-computer-unlocked.html
The link is for test complete not selenium but the steps are sound.该链接用于测试完成而不是 selenium 但步骤是合理的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.