-
Hey. I am getting the following error about a version mismatch while using the
Here is the Docker image I am using (just do FROM python:3.11-alpine
WORKDIR /app
RUN apk add --update --no-cache chromium chromium-chromedriver
RUN pip3 install --upgrade pip && pip3 install --no-cache-dir seleniumbase
ENTRYPOINT ["sleep", "infinity"] Once in the Docker image, run I did not use How can I ensure that the SeleniumBase driver version matches the browser version so I don't get the warning above? Let me know if I can provide any more information to reproduce the issue. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
By default, seleniumbase only downloads a new driver if the major version doesn't match (eg. 117). In the next release, SeleniumBase will let you set an exact version (#2137). Also, based on your warning message, either an error occurred or seleniumbase wasn't used at all, because that warning message shouldn't appear when running tests via seleniumbase. SeleniumBase lets you have mismatched driver/browser versions (Eg. Based on your comments from #2111, it seems like you already figured out how to make it work: Also note that Make sure to use UC Mode if you want Example test: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_uc_mode.py |
Beta Was this translation helpful? Give feedback.
-
That did fix the issue I was receiving in that discussion, but I unfortunately am receiving the browser mismatch with the fix I was referring to. Instead of selecting the exact version to match, is there a way for SeleniumBase to select the same version that the browser uses so there is no mismatch? Is that what This would help in not needing to get the browser version beforehand (as it is in a Docker image, so it will change every time it is rebuilt, if a new version has been released for Alpine Linux), but instead letting SB do the work. |
Beta Was this translation helpful? Give feedback.
-
Hey @mdmintz, I believe this could be solved if I can get the
However, I get the following error when trying to execute the driver (through the CLI, not using Python). # /usr/local/lib/python3.11/site-packages/seleniumbase/drivers/uc_driver --version
sh: /usr/local/lib/python3.11/site-packages/seleniumbase/drivers/uc_driver: not found I tried this on the regular Ubuntu image (not Alpine) and it successfully displays the version. Therefore, I may be missing a package that helps download the driver correctly. Do you know of anything that could be causing this issue and can you reproduce it yourself? There aren't any tracebacks as this is all done through the command line, and I am using SB 4.18.9. Thank you very much for your help on this issue. |
Beta Was this translation helpful? Give feedback.
By default, seleniumbase only downloads a new driver if the major version doesn't match (eg. 117). In the next release, SeleniumBase will let you set an exact version (#2137). Also, based on your warning message, either an error occurred or seleniumbase wasn't used at all, because that warning message shouldn't appear when running tests via seleniumbase. SeleniumBase lets you have mismatched driver/browser versions (Eg.
driver_version="112"
, even if your Chrome version is 117.)Based on your comments from #2111, it seems like you already figured out how to make it work:
Also note that
Driver()
doesn't use UC Mode by default.Make sure to use UC Mode if you want
chromedriver
to remain und…