Questions tagged [robotframework-sshlibrary]

SSHLibrary is a Robot Framework test library for SSH and SFTP.

SSHLibrary is aimed at performing the following,

  • SSHLibrary is a Robot Framework test library for SSH and SFTP.

  • SSHLibrary is operating system independent and supports Python 2.7 as well as Python 3.4 or newer. In addition to the normal Python interpreter, it also works with Jython 2.7.

  • Executing commands on the remote machine, either with blocking or non-blocking behavior.
  • Writing and reading in an interactive shell.
  • Transferring files and directories over SFTP.
  • Ensuring that files or directories exist on the remote machine.
47 questions
4
votes
2 answers

SSHLibrary prompts for password

I have a problem with a test suite. I use robot framework and python.I created a function in python which executes a console command in a remote Linux client. def purge_default_dns(device_ip): ssh_val = "usr1@" + device_ip command = "ctool…
3
votes
1 answer

Robot framework SSHLibrary 0 arguments expected two

I am trying to make a testcase in robotframework with SSHLibrary and running into an error trying to connect with the FTP server. The error I get is keyword login.login expects 0 arguments and gets two. I do not really understand why it does expect…
Jealgu
  • 93
  • 7
2
votes
1 answer

How to execute the commands in the Terminal using robot framework?

I want to execute the below commands in the Terminal using Robot Framework step by step. Any advice on how to go about it? 1. ssh -o ProxyCommand\='ssh -W %h:%p xx.xx.xx.xx' xx.xvb.xyz.wq 2. password 3. sudo su - pentaho 4. cd…
1
vote
1 answer

Not able to switch to super user in terminal From robot framework

Open Connection 192.***.***.** Login **** ******* Start Command su hdfs Execute Command cd /home/rajesh/hive-latest/ ${STDOUT1} Execute Command ls -lrt Log ${STDOUT1} Close Connection *Here i am able to login. after login,…
1
vote
1 answer

Robot Framework - SSH library - Editing a file on remote server

I am writing a test case in Robot Framework where in, I have to either copy the file from the local machine (windows) to the remote server (linux) or create a new one at the location. I have used multiple sudo su - command to switch users to root…
1
vote
1 answer

Exit codes 127 and 255 in Robot Framework

Exit Code: 255, 127 returned when ssh is used to execute a command in a remote server in RobotFramework. The command is not inbuilt command but the absolute path is provided. *** Test Cases *** open_connection_and_login Open Connection ${HOST} …
1
vote
2 answers

Is there any Robot keyword for starting a server(.sh) script and capture the response in a text file or a variable?

I am having a ".sh" server script i want to run this file in my VM, after running i will send a curl request in my VM then this server will receive a response i want to capture the whole response in a file or variable. I have tried to run the server…
1
vote
2 answers

RobotFrameWork with Eclipse - SSHLibrary doesn't seem to do anything. (based on book: Practical Security Automation and Testing)

I am studying in the book: Practical Security Autmation and testing. on page [124] there is a script which uses RIDE with the SSHLibrary. But I'm using Eclipse, so I tried to install it. pip install wheel pip install --upgrade…
tijnn
  • 406
  • 1
  • 8
  • 24
1
vote
2 answers

How to create 2 Objects after importing python based libraries in Robot Framework

I am importing a python libraries and wanted to create two objects with different arguments and call method defined in the class. demo.py class Sample: def __init__(self,path,device): self.device=device self.path = path …
1
vote
0 answers

Robot-Framework SSH Library : Login without a password

I am trying to use the Login keyword for a user without a password and it does not seem possible. After a bit of research I could not find an answer. After Open Connection | hostname I tried Login | ${user} | ${EMPTY} Login | ${user} Login |…
XDD
  • 47
  • 6
1
vote
1 answer

How to display or capture full output of "Execute command" of SSHLibrary?

I am facing problem in executing a command Using SSH. my req: 1. open a ssh connection using IP (example: 125.230.200.80) Login ssh [Documentation] Connecting to SSH and login close all connections open connection ${SSH_IP} port=22 timeout=10 login…
1
vote
1 answer

Robot SSHLibrary pass ssh connection to my library class

Using SSHLibrary currently I execute ssh commands in test suite file or keyword file. Is it possible to do that in my current library file? Meaning my library function just forms the string now. I wanted to executed that in ssh connection in library…
WoodChopper
  • 4,265
  • 6
  • 31
  • 55
0
votes
0 answers

gaierror: [Errno -5] when using SSHLibrary

I am running robotframework inside a Docker container. When I ssh to srv1 from the CLI of the container it works, but when I run the following robotframework test script, I get gaierror: [Errno -5] No address associated with hostname. Does anyone…
0
votes
0 answers

How to take Firewall Name in SSHLibrary for doing open connection to do VM login

To login my VM through robot framework, I require Host name, port, username, password and firewall name. I am done with other things except firewall name. Can someone please assist how to take firewall name in open connection function inside…
0
votes
0 answers

Not able to login into Server using Login Keyword in SSH Library Robot Framework.Getting "timeout: timed out"

I struck in one problem while using SSH Library in robot framework. While Using Login Keyword from SShlibrary. I am getting below error: KEYWORD SSHLibrary . Login ${USERNAME}, ${PASSWORD}, delay = 120 Documentation: Logs into the SSH server…
1
2 3 4