Is it possible to start browser with command line parameters?

120 views
Skip to first unread message

Chris Green

unread,
Dec 30, 2021, 10:00:08 PM12/30/21
to seleniu...@googlegroups.com
I'm running Selenium on Linux (xubuntu 21.10) with Vivaldi. I'm using
Python.

I've got i working OK, I can start Vivaldi OK from Python but I need
to set some command line parameters to allow for some graphics
deficiencies (among other things) on my systems.

So - is it possible to set command line parameters? It can't be done
by simply adding them to the options.binary_location parameter.

--
Chris Green

Chris Green

unread,
Dec 31, 2021, 4:47:29 AM12/31/21
to seleniu...@googlegroups.com
OK, I've worked it out:-

options = webdriver.ChromeOptions()
options.add_argument('--user-data-dir=/home/chris/.config/vivaldi')

It took me a while to realise that Chrome options inherit all the
Chromium options, also of course the common options but that's a bit
more obvious.

--
Chris Green
Reply all
Reply to author
Forward
0 new messages