如何解决此错误 "No keyword with name 'and' found"
How to resolve this error "No keyword with name 'and' found"
当我执行这个关键字时,显示'No keyword with name 'and' found错误。
测试这个关键词
[arguments] ${YearDiff} ${MonthDiff}
Run Keyword If ${YearDiff}>=0 and ${MonthDiff}>=0 Click Element id=Left_Calendar_Icon
Run Keyword If ${YearDiff}<=0 and ${MonthDiff}<=0 Click Element id=Right_Calendar_Icon
如果我使用了错误的语法,请纠正我。
您正在使用 space 分隔格式,这意味着机器人使用两个或多个 space 分隔关键字。 "and" 的每一侧都有两个 space,因此机器人认为 "and" 是关键字。整个表达式需要适合测试用例的单个单元格 table。
解决方法是在"and"的每一边只放一个space:
Run Keyword If ${YearDiff}>=0 and ${MonthDiff}>=0 Click Element id=Left_Calendar_Icon
当我执行这个关键字时,显示'No keyword with name 'and' found错误。
测试这个关键词
[arguments] ${YearDiff} ${MonthDiff}
Run Keyword If ${YearDiff}>=0 and ${MonthDiff}>=0 Click Element id=Left_Calendar_Icon
Run Keyword If ${YearDiff}<=0 and ${MonthDiff}<=0 Click Element id=Right_Calendar_Icon
如果我使用了错误的语法,请纠正我。
您正在使用 space 分隔格式,这意味着机器人使用两个或多个 space 分隔关键字。 "and" 的每一侧都有两个 space,因此机器人认为 "and" 是关键字。整个表达式需要适合测试用例的单个单元格 table。
解决方法是在"and"的每一边只放一个space:
Run Keyword If ${YearDiff}>=0 and ${MonthDiff}>=0 Click Element id=Left_Calendar_Icon