chromedriver = "/path/to/chromedriver" options = Options() options.binary_location = '/path/to/chrome' driver = webdriver.Chrome(chromedriver, chrome_options=options)
Here is what the above code is Doing:
1. Importing the webdriver module from selenium.
2. Creating a variable called chromedriver that contains the path to the chromedriver file.
3. Creating a variable called options that contains the options we want to set.
4. Creating a variable called driver that contains the webdriver object.
5. Creating a new instance of the Chrome webdriver.
6. Passing the chromedriver variable to the webdriver object.
7. Passing the options variable to the webdriver object.