Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command Line Varaible is not overriding Suite Level Variable in Robot Framework

As per Robot Documentation

Variables set in the command line have the highest priority of all variables that can be set before the actual test execution starts. They override possible variables created in Variable tables in test case files, as well as in resource and variable files imported in the test data

I have defined suite level variable browser in Keyword A and calling that keyword in Suite Setup

Log Browser is ${browser}   console=True
Set Suite Variable  ${browser}  chrome
Log Browser is ${browser}   console=True

And Also Passing the same variable using command line --variable pybot.bat --variable browser:ie but from logs it looks like Suite Variable is overriding the command line variable.

What am I missing? ` enter image description here

like image 457
saurabh baid Avatar asked May 10 '17 19:05

saurabh baid


1 Answers

The documentation you quoted says it all (I've added emphasis):

Variables set in the command line have the highest priority of all variables that can be set before the actual test execution starts

Once the test starts, keywords can override the values set by the variable table and command line arguments.

like image 183
Bryan Oakley Avatar answered Sep 30 '22 08:09

Bryan Oakley