0

I have the below script and it executes correctly however I cant get passed the section when system prompts password. I would like to have RF enter the password for me. How can I get this accomplished?

    *** Settings ***
Library  OperatingSystem
Library  Process


*** Variables ***

*** Test Cases ***
Login to Server
      Run  sftp -o "Port 44444" username@mysite.com

Side note: Im trying to drop a file into our sftp server.. I know Robot has SSHLibrary, however, due to security we are blocking SSH calls to this server.

Once I get passed the login process I was thinking the rest should be easy.

rookievmc
  • 173
  • 2
  • 2
  • 13
  • 1
    Linux? If so, [look at the answers here](https://stackoverflow.com/questions/5386482/how-to-run-the-sftp-command-with-a-password-from-bash-script), private key, sshpass or expect will do it. – Todor Minakov Jun 09 '17 at 03:39

1 Answers1

1

If you plan to go through the command line, then please take @Todor's comment to heart and use private keys and that way prevent having to fill in the password at all.

An alternative approach is to create a custom Robot Framework Python Library based on an already existing Python SFTP Client Module, like for example cis-yogesh - Python_sftp_client and convert it to a Robot Library.

A. Kootstra
  • 6,827
  • 3
  • 20
  • 43