How to resolve this error "There is no keyword with the name" and "found"

When I execute this keyword, the message “No keyword with name” and “error found” is displayed.

Check this keyword

[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 

Correct me if I used the wrong syntax.

+5
source share
2 answers

You are using a space-separated format, which means the robot uses two or more spaces to separate keywords. You have two spaces on each side "and" so the robot thinks "and" is the keyword. The whole expression should be placed in one cell of the test case table.

The solution is to place only one space on each side of the "and":

 Run Keyword If ${YearDiff}>=0 and ${MonthDiff}>=0 Click Element id=Left_Calendar_Icon 
+5
source

* Setitngs * Selenium2Library library

* Variables * $ {BROWSER} ff $ {URL} http://www.thetestingworld.com/index.php

* Test cases * Tc_001 Browser Start and close Open a browser to enter the page

* Keywords * Open a browser to enter the page Open a browser $ {URL} $ {BROWSER}

No keywords were found with the name "Open Browser"

C: \ Users \ manoj kumar \ Desktop \ project_practice \ robot_concepts> pybot first_robot_program.robot

First robot program

Tc_001 Start and Close Browser | FAIL |

No keywords were found with the name "Open Browser".

The first program of robots | FAIL | 1 critical test, 0 passed, 1 failed

1 test total, 0 passed, 1 failed

Output: C: \ Users \ manoj kumar \ Desktop \ project_practice \ robot_concepts \ output.xml Log: C: \ Users \ manoj kumar \ Desktop \ project_practice \ robot_concepts \ log.html Report: C: \ Users \ manoj kumar \ Desktop \ project_practice \ robot_concepts \ report.html

how to clear a question

0
source

Source: https://habr.com/ru/post/1235012/


All Articles