简体   繁体   中英

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 0 arguments.

the resource file in which the keyword file exists has the following code:

*** Settings ***
Library    SSHLibrary

*** Keywords ***
lOGIN
    Set Default Configuration    30s
    Open Connection     ${HOST}
    Login               ${USERNAME}        ${PASSWORD}

The test I like to run looks like:

 *** Settings ***
Documentation    Example of testing an accrual for TLOG
Resource    ../Resources/login.robot

*** Variables ***
${HOST}    sitenv
${USERNAME}    crmapplication
${PASSWORD}  Company11*

*** Test Cases ***
logintositenv
    login.login

Any idea what is going wrong? I am especially surprised I cannot get it to work because I used the open connection and login keywords from SSHLibrary before when I was trying out a few things and it worked fine.

As you said login.login That tells me you have probably another library that has keyword login. In this case you have to specify that you want to use SSH library. You can do this with

SSHLibrary.Login

Here you can have a look how to import library with custom name and use keywords

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM