Reputation: 9
in below Example, I want to get url from Command prompt
*** Settings ***
Library SeleniumLibrary
*** Variables ***
*** Test Cases ***
TestModule
Launch webpage
*** Keywords ***
Launch webpage
Open Browser $[url] chrome
Wait Until Page Contains Amazon.in
Close Browser
Upvotes: 0
Views: 1199
Reputation: 214
the way to use robotframework cmd variables is the following: robot --variable EXAMPLE:value path/to/test
so in your case:
robot --variable url:<url_value> path/to/test
your code should look like this:
*** Settings ***
Library SeleniumLibrary
*** Variables ***
*** Test Cases ***
TestModule
Launch webpage
*** Keywords ***
Launch webpage
Open Browser ${url} chrome
Wait Until Page Contains Amazon.in
Close Browser
Upvotes: 2