I need to run my selenium test cases remotely in headless mode.
Currently, I am running below py.test command
py.test --driver remote --host selenium.host --port 4444 --capability browserName firefox --capability platform LINUX
And for headless mode, I need to handle that in conftest.py
file
But I need that option in command line, instead of handling that in conftest.py
file
@pytest.fixture
def chrome_options(chrome_options):
chrome_options.add_argument('--headless')
return chrome_options
@pytest.fixture
def firefox_options(firefox_options):
firefox_options.add_argument('-headless')
return firefox_options