Here is the code that I am using

Resource file code

*** Settings ***

Library  SeleniumLibrary

Variables       ../PageObject/inspectpath.py

*** Keywords ***

open my browser

    [Arguments]    ${siteurl}   ${browser}
    open browser    ${siteurl}   ${browser}
    maximize browser window

Testcase file

*** Settings ***

Library    SeleniumLibrary

Resource   ../Resources/OCKeywords.robot


*** Variables ***

${browser}      chrome

${siteurl}     http://automationpractice.com/index.php



*** Test Cases ***

Register

    open my browser     ${browser}      ${siteurl}
1

There are 1 best solutions below

1
Bryan Oakley On

The first argument to your open my browser keyword is the site url, and the second is the name of the browser. That is because you defined the arguments like this:

[Arguments]    ${siteurl}   ${browser}

However, when you call it you are sending the arguments in reverse order here:

open my browser     ${browser}      ${siteurl}

The solution is to pass the arguments in the correct order:

open my browser     ${siteurl}  ${browser}