Jerome Reyes
Jerome Reyes

Reputation: 1

Why I'm having an error on my robotframework automation

I'm getting this error on my code when running my Python robot framework

No keyword with name 'Open Url Browser' found. Did you mean: SeleniumLibrary.Open Browser

I have utils ui_handler.py which has method def open_url_browser

def open_url_browser(self, url):
    """Open browser and maximize window"""
    self.open_browser(url, browser="Chrome")
    self.maximize_browser_window()

I'm calling it on my Resource File

Open Test Browser
    [Arguments]    ${url}
    Open Url Browser    ${url}

and here's what it looks like on my test

*** Test Cases ***
Validate Login Successful
    Open Test Browser    ${URL1}

Upvotes: 0

Views: 20

Answers (1)

Helio
Helio

Reputation: 3737

You should have shown us a complete example.

You probably have in resource file:

*** Settings ***
Library        ui_handler.py

*** Keywords ***
Open Test Browser
    [Arguments]    ${url}
    Open Url Browser    ${url}

If not, then try it.

Another reason for failing, could be that your Python script does not import the running instance of SeleniumLibrary.

Upvotes: 0

Related Questions