Vdev
Vdev

Reputation: 103

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

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?

Upvotes: 1

Views: 2950

Answers (2)

Emily Zhai
Emily Zhai

Reputation: 112

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

def input_username(self, arg1):

Upvotes: 2

Bryan Oakley
Bryan Oakley

Reputation: 385930

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.

Upvotes: 0

Related Questions