Robot framework. Control Linux system on virtualbox doesn't work

189 views Asked by At

I'm tring to run testcase with robotframework but on a remote system on virtualbox. The system is Linux. I downloaded all needed libraries and I always gets error that I can't connect to the remote system.

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


Console

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)

I uninsatlled all libraries and insatlled them again but no difference.

1

There are 1 answers

0
klode On

You mention "the system is Linux". Is the VM Linux on a Windows workstation, or is the VM Windows on a Linux workstation? I ask because your console messages include Windows pathnames "C:\Users----...". So I'm guessing that you have a Windows workstation, running a Linux VM.

Given that assumption, plus the error message, plus the IP address you're using looks like a VMware address, I presume that your code is running under Windows, trying to connect to port 8087 on the Linux VM.

Are you able to connect to that IP address and TCP port from the command line? For example:

telnet 192.168.56.101 8087

If my assumptions above are correct, you should try telnet from the Windows desktop to that IP address (which would be the Linux VM's IP, right?).

Thinking further: that IP address (192.168.56.101) is in a range that's typically assigned by VMware when the VM is connected via NAT networking or host-only networking. Can you confirm which?

If so, are you actually trying to connect to the VM from the host OS of the system on which the VM is running? If all of my assumptions above are correct, and if you're trying to connect from some other system on your network, that won't work.

That's enough speculation by me for now; I may be far off the mark :-). Please update your question.

--klode