How can I download Chromedriver for 64 bit Windows machine?

94    Asked by Deepabhawana in QA Testing , Asked on May 21, 2024

 I am a software developer and I am currently engaged in a particular task that is related to working on an automation project that involves running a Selenium test on a 64-bit Windows machine. For this, I need to download the Chrome driver to interact with the Chrome browser for my test. How can I download and set up the Chromedriver for my 64-bit Windows machine? 

 In the context of selenium, here are the steps given of how you can download and set up chrome driver for your 64-bit Windows machine:-

Checking Chrome driver version

Firstly, open your Chrome browser go to the menu, and then select help > about Google Chrome. Note down the version numbers.

Download Chromedriver

Now you can navigate to the Chromedriver download page where you can download the Chromedriver version which matches your Chrome version.

Extracting and setting up

Now extract the downloaded ZIP file in your system.

Ensuring compatibility

Try to ensure that the Chrome driver matches the major version number of your Chrome browser.

Here is an example given in Java of how you can download, set up, and use the Chromedriver for Selenium automation testing on a 64-bit Windows machine:-

Import org.openqa.selenium.WebDriver;
Import org.openqa.selenium.chrome.ChromeDriver;
Public class ChromeDriverSetupExample {
    Public static void main(String[] args) {
        // Specify the path where ChromeDriver will be downloaded and set up
        String chromeDriverPath = “C:\WebDriver\chromedriver.exe”;
        // Set the system property to use ChromeDriver
        System.setProperty(“webdriver.chrome.driver”, chromeDriverPath);
        // Create a new instance of ChromeDriver
        WebDriver driver = new ChromeDriver();
        // Navigate to a website
        Driver.get(http://www.example.com);
        // Print the title of the page
        System.out.println(“Page Title: “ + driver.getTitle());
        // Close the browser
        Driver.quit();
    }
}

Here is the example given by using Python of how you can download, set up, and use the chrome driver for Selenium automation testing on a 64-bit windows machine:-

From selenium import webdriver

# Specify the path where ChromeDriver will be downloaded and set up

Chrome_driver_path = “C:\WebDriver\chromedriver.exe”
# Set the path to ChromeDriver executable
Webdriver.chrome.driver = chrome_driver_path
# Create a new instance of ChromeDriver
Driver = webdriver.Chrome()
# Navigate to a website
Driver.get(http://www.example.com)
# Print the title of the page
Print(“Page Title:”, driver.title)
# Close the browser
Driver.quit()


Your Answer

Interviews

Parent Categories