Installing Selenium For Google Chrome (Windows 10)


This tutorial will show you how to install Selenium for Google Chrome (Windows 10), and optionally Python related dependencies.

Prerequisites:

  • Google Chrome Installed on your Windows machine

Guide Outline

  1. Install the WebDriver
    1. Check Your Google Chrome Version
    2. Download the ChromeDriver
  2. Python Set-Up
    1. Open PowerShell
    2. Verify Python Selenium Installation

Install the WebDriver

WebDriver (ChromeDriver for Chrome) gives Selenium access to control your web-browser.

Check Your Google Chrome Version

  • Find Chrome version (remember it for later):

    … → Help → About Chrome

86695802ec4222cce52a2319f0fb2a24.png

Download the ChromeDriver

  • Download the Chromedriver Binary (which matches your Chrome version):

webdriver binary dl page

  • Extract the chromedriver_win32.zip anywhere.

  • Copy the absolute path to chromedriver.exe (remember it for later, it is needed for Python and other scripts).

090980263de30a2bd06535c027f20acf.png

  • You can now delete the chromedriver_win32.zip it will not be needed anymore. Your WebDriver installation is complete.

Python Set-up

prerequisites:

  • Python 3 - installed
  • pip - Python package manager installed

We will finish the set-up required for running Python based Selenium scripts.

Open PowerShell

Hold shift + mouse2; then click "Open PowerShell window here" a9807464049fa81f21f312754c62e6d7.png

Install Python Selenium Package

In the PowerShell, enter:

pip install selenium

Verify Python Selenium Installation

In the PowerShell, enter:

python

In the Python REPL, enter:

>>> import selenium

If no errors occurred during pip install selenium, and import selenium you are done with your Python set-up.

Remember absolute path to the chromedriver.exe in your Python scripts.