我正在尝试使用 robotsframework 运行测试用例,但在 virtualbox 上的远程系统上。系统是Linux。我下载了所有需要的库,但总是收到无法连接到远程系统的错误。
That's my code
*** Settings ***
Library Telnet
Library RPA.Windows
Library AppiumLibrary
Library SeleniumLibrary
Library SikuliLibrary
Library ExcelLibrary
Library OperatingSystem
Library Remote http://192.168.56.101:8087
#ibrary SSHLibrary http://192.168.56.101:8087
*** Test Cases ***
TC1
Telnet.Open Connection http://192.168.56.101 port=8087
SikuliLibrary.Double Click 007DSS.png
#SikuliLibrary.Input Text ${EMPTY} text
控制台
Started: C:\Users\----\PycharmProjects\pythonProject\Test.robot
2023-11-19 23:37:43,161 - RPA.core.certificates - INFO - Truststore not in use, HTTPS traffic validated against `certifi` package. (requires Python 3.10.12 and 'pip' 23.2.1 at minimum)
[ ERROR ] Error in file 'C:\Users\----\PycharmProjects\pythonProject\Test.robot' on line 9: Getting keyword names from library 'Remote' failed: Calling dynamic method 'get_keyword_names' failed: Connecting remote server at http://192.168.56.101:8087 failed: [WinError 10061] Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte
==============================================================================
Test
[ERROR] Error in file 'C:\Users\----\PycharmProjects\pythonProject\Test.robot' on line 9: Getting keyword names from library 'Remote' failed: Calling dynamic method 'get_keyword_names' failed: Connecting remote server at http://192.168.56.101:8087 failed: [WinError 10061] Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte
==============================================================================
[info (+0.01s)] Opening connection to http://192.168.56.101:8087 with prompt: None
[FAIL] gaierror: [Errno 11001] getaddrinfo failed
TC1 | FAIL |
gaierror: [Errno 11001] getaddrinfo failed
------------------------------------------------------------------------------
Test | FAIL |
1 test, 0 passed, 1 failed
==============================================================================
Output: C:\Users\---\PycharmProjects\pythonProject\log\output.xml
Log: C:\Users\---\PycharmProjects\pythonProject\log\log.html
Report: C:\Users\---\PycharmProjects\pythonProject\log\report.html
Robot Run Terminated (code: 0)
我卸载了所有库并再次安装它们,但没有区别。
你提到“系统是Linux”。 Windows 主机上的虚拟机是 Linux,还是 Linux 主机上的虚拟机是 Windows?我问这个问题是因为您的控制台消息包含 Windows 路径名“C:\Users----...”。
您可以从命令行连接到该主机和 TCP 端口吗?例如:
telnet 192.168.56.101 8087
--克洛德