0

I have set up robotframework on my machine and I have installed all necessary plugin and using Pycharm as IDE.

But I am getting keyword not found error and also SeleniumLibrary library which I have defined in the setting section is giving me inspection info: This inspection occurs when library or resources is not defined.

Please go through attached screenshot for more details.

Can anyone help me to resolve this?

enter image description here enter image description here enter image description here

  • pip install --upgrade robotframework-seleniumlibrary did you install the library? – PDHide Aug 4 at 16:51
  • Just see your Library - This is in small char "seleniumlibrary" . you should just make it like SeleniumLibrary Just try it before copying someones code you will learn something – kartik singh Sep 7 at 16:27
  • Check the code on the screenshot it is written as SeleniumLibrary. – Bence Kaulics Sep 7 at 19:25
0

You have not defined any test cases, so RF interprets Open Browser as the test case name and gc as a keyword.

A .robot file is not a single test case but a collection of test cases, a suite.

*** Settings ***
Library        SeleniumLibrary

*** Variables ***
${url}        https//www.happyeasygo.com/

*** Test Cases ***
My Test Case
    Open Browser    ${url}    gc

My 2nd Test Case
    Log    This is my second test case
0

In the test case table, the first column/cell represents the test case name, and then the next column is either blank, a variable, or a keyword.

Thus, in your example Open browser is considered the test case name, ${url} is a variable to be assigned, and gc is considered to be a keyword.

If you want to call open browser, it needs to be indented under a test case name. For example:

*** Test Cases ***
Example
    Open browser  ${url}  gc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.