RobotFramework: Keyword 'Selenium2Library.Inpu

2019-03-02 17:27发布

Code:

Input Username
    [Arguments]    ${username}
    Input Text    login_username_id    ${username}

Error:- Keyword 'Input Username' expected 1 arguments, got 0 May i know why am i getting this error?

2条回答
2楼-- · 2019-03-02 17:36

The error message is telling you exactly what the problem is: your keyword Input Username expects exactly one argument, but the place where you are calling it is only providing one argument.

查看更多
Bombasti
3楼-- · 2019-03-02 17:56

Pass in self as the first argument in your method. Something like:

def input_username(self, arg1):
查看更多
登录 后发表回答