I'd like to automate the following Linux shell command:
google-chrome-stable --password-store=basic --user-data-dir=/tmp/chrome
using splinter
(or selenium
), but I cannot find documentation/examples that explain how to pass arguments and values to the Browser
command.
The following (wrong) code shows what I tried:
"""
google-chrome-stable --password-store=basic --user-data-dir=/tmp/chrome
"""
from splinter import Browser
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option("password-store", "basic")
chrome_options.add_experimental_option("user-data-dir", "/tmp/chrome")
browser = Browser('chrome', options=chrome_options)
Can you help with the correct syntax?
This is how it's done: