I have been trying to run a very basic script in Python 3.6 which uses Selenium & chromedriver-2.42.
Here is the script:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import os
ch = os.getcwd() + '\\chromedriver'
options = Options()
options.set_headless(headless=True)
driver = webdriver.Chrome(options=options, executable_path=ch)
driver.get("http://google.com/")
driver.get_screenshot_as_file('capture.png')
driver.quit()
While running it, I get the following error:
I am using Windows 7 x64.
It'll be a great help if anyone could guide me to solve this error. Thank you!