Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No keyword with name 'Open Browser' found

I am writing a simple test case where i am opening a chrome browser with the url using robot framework with python and selenium2library

I HAVE TRIED ALL THE WAYS TO MAKE IT DONE ,LIKE INSTALLING AND UNINSTALLING THE PYTHON ETC

HERE IS THE ERROR

No keyword with name 'Open Browser' found.
------------------------------------------------------------------------------
Check                                                                 | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
=============================================================================
like image 228
Vani Avatar asked Oct 16 '25 19:10

Vani


2 Answers

You need to include a line in your Settings section that says

Library | SeleniumLibrary

and you might also need to run

pip install --upgrade robotframework-seleniumlibrary

Good luck!

like image 54
laasch Avatar answered Oct 19 '25 11:10

laasch


This type of error message may have several reasons : 1- The number of spacing between keywords and the variable; 2- Lack of loading of the test library; 3- ...

With robot framework the spacing is at least size 4. For exemple Library SeleniumLibrary

Here's a simple test case to open the chrome browser and enter the url https://google.fr :

Style 1 :

*** Settings ***
Documentation     Simple example using SeleniumLibrary.
Library           SeleniumLibrary


*** Test Cases ***
Valid Login
    Open Browser     https://google.fr    chrome

Style 2 :

*** Settings ***
Documentation     Simple example using SeleniumLibrary.
Library           SeleniumLibrary

*** Variables ***
${LOGIN URL}      https://google.fr
${BROWSER}        Chrome

*** Test Cases ***
Valid Login
    Open Browser     ${LOGIN URL}    ${BROWSER}

If you have any questions, don't hesitate to ask them. Good luck !

like image 35
Nafa Avatar answered Oct 19 '25 13:10

Nafa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!