我正在编写一段代码来实现桌面应用程序的自动化。我从互联网上看到selenium可以用于使用webdriver.Remote()实现桌面应用程序的自动化。我正在设法使计算器自动化。但是,在试图打开计算器时,我得到了WinError 10061。错误消息和代码如下所示。
from selenium import webdriver
#initialising driver to open the calculator
driver = webdriver.Remote(
command_executor='http://localhost:9999',
desired_capabilities={
"debugConnectToRunningApp": 'false',
"app": r"C:/windows/system32/calc.exe"
})但是这段代码给出了一个错误
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost',port=9999):最大重试超过url: /session (由0x00000294BF4AB6A0>处的NewConnectionError('
我试过禁用防火墙,但没有帮助。如何纠正此错误?
https://stackoverflow.com/questions/73864392
复制相似问题