简体   繁体   English

当我关闭 RDP 连接时,基于 WinAppDriver 的自动化停止在 windows 10 VM 上工作

[英]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.

相关问题 基于 winappdriver 的 java selenium 自动化在一段时间后停止工作 - winappdriver based java selenium automation stops working after some time 当webservice停止工作时,为什么我看到很多CLOSE_WAIT状态的套接字? - Why am i seeing lots of sockets in CLOSE_WAIT status when webservice stops working? 窗口小部件停止工作后,我关闭了我的应用 - Widget stops working atfter I close my app 如何解决 windows 10 OS 下 selenium 中的连接不安全? 帮助 SLENIUM firefox 测试自动化社区请 - How to solve connection not secure in selenium under windows 10 OS ? HELP SLENIUM firefox tests automation community pleease 为什么关闭客户端后服务器停止运行? - Why the server stops running when I close the Client? 使用SessionFactoryUtils时是否应该关闭连接 - Should I close connection when using SessionFactoryUtils 当我尝试关闭MySQL连接时出错 - Error when I try to close MySQL connection 当我将等待时间定为10秒时,自动化将等待网页加载10分钟 - Automation waits for the webpage to load for 10 minutes when i have given wait time as 10 seconds 在Windows 10上检测Java VM体系结构 - Detecting Java VM architecture on Windows 10 我应该在哪里存储DBI连接,什么时候应该关闭它? - Where should I store a DBI connection and when should I close it?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM