0

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:

Error

I am using Windows 7 x64.

It'll be a great help if anyone could guide me to solve this error. Thank you!

Ratmir Asanov
  • 6,237
  • 5
  • 26
  • 40
Contrevien
  • 124
  • 12

0 Answers0