selenium.webdriver.chrome.webdriver

class selenium.webdriver.chrome.webdriver.WebDriver(executable_path='chromedriver', port=0, chrome_options=None, service_args=None, desired_capabilities=None, service_log_path=None)[source]

Controls the ChromeDriver and allows you to drive the browser.

You will need to download the ChromeDriver executable from http://code.google.com/p/chromedriver/downloads/list

Creates a new instance of the chrome driver.

Starts the service and then creates new instance of chrome driver.

Args :
  • executable_path - path to the executable. If the default is used it assumes the executable is in the $PATH
  • port - port you would like the service to run, if left as 0, a free port will be found.
  • desired_capabilities: Dictionary object with non-browser specific capabilities only, such as “proxy” or “loggingPref”.
  • chrome_options: this takes an instance of ChromeOptions
quit()[source]

Closes the browser and shuts down the ChromeDriver executable that is started when starting the ChromeDriver

save_screenshot(filename)[source]

Gets the screenshot of the current window. Returns False if there is any IOError, else returns True. Use full paths in your filename.

Previous topic

selenium.webdriver.chrome.service

Next topic

selenium.webdriver.firefox.extension_connection

This Page