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

image

Common Types of Software Bugs

Dealing with bugs is one of the biggest headaches in the software development lifecycle. No matter how carefully someone writes code, it’s impossible to create a software product that works perfectly every time. Skipping detailed testing often causes major issues later on.

Read More »
How to inspect elements in Chrome?

How to Inspect Elements in Chrome?

Understanding how to use the “Inspect Element” feature in Chrome is a critical skill for web developers and designers alike. This tool is indispensable, no matter what web development task you’re tackling.

From resolving layout issues and debugging JavaScript to analyzing a webpage’s structure, Chrome’s Developer Tools’ “Elements” panel offers a robust suite of functionalities that enable you to delve into the HTML, CSS, and JavaScript that power websites.

Read More »