SDET Unicorns

Setting Up Chrome 115 & 116 for Selenium Docker: Navigating Chromedriver Changes

Chrome 116 & 116 for Selenium Docker

Table of Content

Introduction

In this guide, we’ll be focusing on setting up Chrome 115 & 116+ for Selenium Docker, going over on the important Chromedriver changes that have emerged. With the successive releases of Chrome 115 and Chrome 116, there have been notable changes in how Chromedriver is managed and accessed. Google Chrome Labs introduced a new dashboard with Chrome 115, named “Chrome for Testing,” which replaced the traditional Chromedriver download site. As Chrome 116 continues this evolution, the question comes whether these changes have any effects on the way we need to set up Chrome 115 & 116 for Selenium Docker.

Understanding the Chromedriver Changes in Chrome 115 & 116

According to the official announcement, the primary reasons for this shift are:

  1. Automatic Browser Updates: With browsers updating automatically, there’s a mismatch between the browser and Chromedriver versions, leading to potential issues.
  2. Versioning: The new dashboard, introduced with Chrome 115, offers a clear versioning system, ensuring testers find the right Chromedriver for their browser version, be it Chrome 115 or 116.
  3. Ease of Access: The new system aims to make it easier to find and download the correct Chromedriver.

For a deeper dive into these changes, we discussed them in our previous blog post.

Chrome 115 & 116 for Selenium Docker: What Does It Mean?

For those integrating Chrome 115 & 116 for Selenium Docker, the good news is that these changes won’t drastically affect your testing experience. Here’s why:

  • Versioned Images: Selenium Chrome Docker images are equipped with a versioned browser and Chromedriver binaries for both Chrome 115 and 116. This ensures they remain compatible, regardless of the browser’s version.

  • Automated Handling: Even though Chromedriver’s download process has changed, Docker images will handle these changes internally. As a user, you won’t need to make any manual adjustments when setting up Chrome 115 & 116 for Selenium Docker. The updated Docker images will set up the Chromedriver using the new link from Chrome for Testing.

Demo: Running Tests on Docker with Chrome 115

To demonstrate that the Docker experience remains unaffected, let’s run a simple test:

				
					const { Builder } = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');

(async function example() {
    let driver = await new Builder()
        .forBrowser('chrome')
        .usingServer('http://localhost:4444/wd/hub')
        .setChromeOptions(new chrome.Options())
        .build();

    try {
        await driver.manage().window().maximize()
        await driver.get('http://www.sdetunicorns.com');
        let title = await driver.getTitle();
        console.log(title);
    } catch (error) {
        console.log("Error:", error.message);
    } finally {
        await driver.quit();
    }
})();

				
			

Docker Command for Chrome 115:

				
					docker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome:115

				
			

By executing the above command for each version, users can view test results on noVNC at port 7900. The tests will run on the respective Chrome versions using the Chromedriver from “Chrome for Testing.”

Chrome 115 & 116 for Selenum Docker - NoVNC Viewer

Visual Guide

For those who prefer a hands-on approach, we’ve crafted a comprehensive video tutorial that covers the changes and their implications for both Chrome 115 and 116. Dive into the demo for a clearer understanding on our YouTube channel.

Conclusion

The changes that came in with Chrome 115, followed by Chrome 116, and the “Chrome for Testing” dashboard have updated a few things for developers and testers. While there are new elements to consider, the core experience remains largely unchanged for those leveraging Chrome 115 & 116 for Selenium Docker, thanks to versioned Docker images and the platform’s adaptability. As the browser world evolves, it’s crucial for developers & testers to stay informed about these new changes.

Frequently Asked Questions

"Chrome for Testing" is a dedicated flavor of Chrome designed specifically for web app testing and automation. It offers a more streamlined and reliable way to download Chromedriver, ensuring compatibility with the respective Chrome version.

After setting up Docker and pulling the necessary Selenium image, you can initiate a Docker container and run your Selenium tests against it. The container will have both the browser and Chromedriver pre-installed, simplifying the testing process.

When using Selenium Docker images, ChromeDriver is typically pre-installed. However, if you're setting up a custom Docker image, you can fetch the ChromeDriver binary from the "Chrome for Testing" dashboard and add it to your Dockerfile.

Selenium tests can be run on Chrome using the Chromedriver. Ensure that the versions of Chrome and Chromedriver are compatible. Initialize the WebDriver to use Chrome and execute your test scripts.

My Resources

Thrive Suite: The all-in-one WordPress theme I used to create my blog.
Jasper AI: My favorite AI writing tool.
Surfer SEO:  A tool to help you rank your content on the first page of Google.

Write Content Faster

5/5

Write blog posts that rank for affiliate terms!

Join our mailing list

Unlock the Secrets to Becoming a SDET Pro in the Industry!

Stay ahead of the curve! Join our mailing list for exclusive insights, tips, and the latest industry updates delivered straight to your inbox

Table of Content

Related Post

7 Principles of Software Testing

7 Principles of Software Testing with Examples

Software testing plays a crucial role in the software development life cycle as it helps ensure the quality, reliability, and performance of the final product. Software testing is not just about finding defects; it also provides valuable insights into the overall quality of the software. By conducting effective software testing, it shows how well the application behaves in different scenarios and whether it meets user expectations.

Read More »
Differences Between CI/CD and DevOps

Key Differences Between CI/CD and DevOps

Software development is far from a simple journey that involves merely executing code and launching applications. It often presents challenges, as it’s rare to get everything right from the start. Each time you implement new or frequent code changes, you inadvertently introduce potential issues that can be time-consuming to resolve. This complexity necessitates a structured approach to ensure smooth production.

Read More »