RobotFramework: Keyword 'Selenium2Library.Input Text' Error Keyword 'Input Username' expected 1 arguments, got 0

主宰稳场 提交于 2019-12-02 14:01:38

问题


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?


回答1:


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

def input_username(self, arg1):



回答2:


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.



来源:https://stackoverflow.com/questions/31584762/robotframework-keyword-selenium2library-input-text-error-keyword-input-usern

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!