RobotFramework:关键字“Selenium2Library.Input Text"错误关键字“输入用户名"需要 1 个参数,得到 0 [英] RobotFramework: Keyword 'Selenium2Library.Input Text' Error Keyword 'Input Username' expected 1 arguments, got 0

查看:48
本文介绍了RobotFramework:关键字“Selenium2Library.Input Text"错误关键字“输入用户名"需要 1 个参数,得到 0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

代码:

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

错误:- 关键字输入用户名"需要 1 个参数,得到 0我可以知道为什么我会收到这个错误吗?

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

推荐答案

将 self 作为方法中的第一个参数传递.类似的东西:

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

def input_username(self, arg1):

这篇关于RobotFramework:关键字“Selenium2Library.Input Text"错误关键字“输入用户名"需要 1 个参数,得到 0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆