Is it possible to control the test suite execution of robot framework with or without headless chrome in executable command?

Is it possible to control the test suite execution of robot framework with or without headless chrome in executable command in CLI?

i am going to run all my test cases in headless mode by default. If i want to run in GUI mode, then i don’t want to comment the headless chrome argument in my coding file. Instead of that, is there any possibilities to run in GUI via command line in CLI?

Thanks,
keerthana

Hi Keerthana,

Referring to the example from ​https://robotframework.org/SeleniumLibrary/#usage

try something like this:

*** Settings ***
Documentation     Simple example using SeleniumLibrary.
Library           SeleniumLibrary

*** Variables ***
${LOGIN URL}      http://localhost:7272
${BROWSER}        headlesschrome

*** Test Cases ***

Then when you want to use Chrome just run robot like this:

robot --variable BROWSER:Chrome yourfile.robot
1 Like

Thanks @damies13 sure let me try !!!

It works!! Thanks for your help @damies13

1 Like