markhobson / docker-maven-chrome

Docker image for Java automated UI tests.
https://hub.docker.com/r/markhobson/maven-chrome/
Apache License 2.0
101 stars 82 forks source link

download.default_directory no longer working #44

Closed muppet3000 closed 1 year ago

muppet3000 commented 1 year ago

Since the upgrade to Chromedriver 110.0.5481.77 the download.default_directory setting is no longer honoured.

This is a bug upstream: https://github.com/SeleniumHQ/selenium/issues/11637

It's up to you whether you'd consider reverting back to the previous release or waiting for the fix, however since we use the download directory extensively in our work we've had to revert back to a previous version of the docker image that we had stored locally.

Perhaps it would be nice to consider an additional naming convention for the docker images to allow use of specific Chromedriver releases e.g. jdk-11 and also jdk-11-<chromedriver_version> Therefore in the event of such an issue we can pin to specific previous versions until an update is available?

markhobson commented 1 year ago

Hi, sorry to hear that. There has been previous discussions about tagging the image for browser versions (see #2), but I'm not sure that I have the bandwidth to maintain tags beyond the JDK versions.

As a workaround, have you considered using digests to fix the image in your builds? For example:

$ docker run -it --rm markhobson/maven-chrome:jdk-11@sha256:d5851295c6815c0d21d4c981f4431bcb47ffe53048ebc0f2a4deec7cf7ecf78e chromedriver --version
ChromeDriver 110.0.5481.77 (65ed616c6e8ee3fe0ad64fe83796c020644d42af-refs/branch-heads/5481@{#839})

$ docker run -it --rm markhobson/maven-chrome:jdk-11@sha256:4b34e00416695937de6190967ae6c92dfcdb80519d29801e5b557d43395f3991 chromedriver --version
ChromeDriver 109.0.5414.74 (e7c5703604daa9cc128ccf5a5d3e993513758913-refs/branch-heads/5414@{#1172})

Hopefully this can tide you over until ChromeDriver is fixed.

muppet3000 commented 1 year ago

I'd forgotten actually that you could do that. We'll use that in the meantime. In terms of bandwidths, I completely understand, I'll see whether I have some time and could try contributing a PR that would extend your ci pipelines to do this automatically for you. Thanks for taking the time to respond at least. Can I ask that this ticket remains open until the next chromedriver bump happens so I can track when a resolution is available?

markhobson commented 1 year ago

It is an often forgotten feature, handy at times though!

Thanks, I'd be interested in automatically tagging images with the browser version. Although note that Chrome and ChromeDriver versions don't always match exactly, e.g. right now the latest versions are Chrome 110.0.5481.100 and ChromeDriver 110.0.5481.77.

Sure, no problem to keep this open until your issue is resolved. Have you got a link to the underlying ChromeDriver bug?

muppet3000 commented 1 year ago

Tagged in my original comment.

markhobson commented 1 year ago

That seems to be the Selenium issue, where they said to raise one in ChromeDriver instead.

muppet3000 commented 1 year ago

So it is, my bad, I'll ask in that other thread to see if anyone actually raised the issue.

markhobson commented 1 year ago

Hi @muppet3000, has this issue been resolved now? I'll close this if so.

markhobson commented 1 year ago

Closing due to inactivity.