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}
The first argument to your
open my browserkeyword is the site url, and the second is the name of the browser. That is because you defined the arguments like this:However, when you call it you are sending the arguments in reverse order here:
The solution is to pass the arguments in the correct order: