Lessons Learned from Test Failures due to a new ChromeDriver Bug

Zhimin Zhan
4 min readMar 14, 2021

On 2019–06–15, I upgraded my test lab with BuildWise Agent v1.5.1 (including the latest ChromeDriver 75.0.3770.8) and triggered one of my continuous testing process: executing 603 Selenium WebDriver automated regression tests for ClinicWise. The build failed!

The build log showed the failure: the downloaded file was not at the expected location.

I was quite sure that no code changes could cause the issue, since the last successful build. Still, I re-ran the failed tests in TestWise IDE and verified that the file was not saved to the specified folder.

@download_path = File.expand_path File.join(File.dirname(__FILE__), "..", "tmp")
prefs = {
:download => {
:prompt_for_download => false,
:default_directory => @download_path
}
}
@driver = Selenium::WebDriver.for :chrome, :prefs => prefs

From the build history on the CT server, I was pretty sure the cause was neither code nor test scripts. It most likely was: Chrome browser (v75) or ChromeDriver v75. I checked ChromeDriver’s release log, no mentioning changes on the chrome preferences there. Then I visited ChromeDriver Google Group, found one related post:

A user: Is chrome following your preferences for this? Currently, my default_directory is…

--

--

Zhimin Zhan

Test automation & CT coach, author, speaker and award-winning software developer. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.