I build selenoid docker images for firefox myself and have them configured in the browsers.json
as follows:
"firefox": {
"default": "66.0",
"versions": {
"beta": {
"image": "my/path/to/firefox:beta",
"port": "4444"
},
"66.0": {
"image": "selenoid/vnc:firefox_66.0",
"port": "4444"
}
}
}
Sending the version=beta
capability causes the webdriver to throw
selenium.WebDriverException: Requested environment is not available
In the logs I found
2019/04/03 08:17:29 [3] [PROXY_TO] [90ab834d22aa3bbe2731eeb550497eec7ef9fb11c1e7f4609d617cf6a25124e7] [http://172.17.0.4:4444]
2019/04/03 08:17:29 [3] [SESSION_ATTEMPTED] [http://172.17.0.4:4444] [1]
2019/04/03 08:17:29 [3] [SESSION_ATTEMPTED] [http://172.17.0.4:4444/wd/hub] [2]
2019/04/03 08:17:29 [3] [SESSION_FAILED] [http://172.17.0.4:4444/wd/hub] [400 Bad Request]
Since the exact same thing works for chrome and it also works if I set "default": "beta"
in the browsers.json
and do not set the version
capability, I assume this happens because geckodrivers matches the version from the capabilites against the actual browser version. (as presumed here).
I have several ideas how to work around this, but do not know how to technically implement these:
- Prevent Selenoid from passing the
version
capability to the selenium driver (geckodriver in this case) - Prevent geckodriver from checking
version
capability and browser version - Add another flag to selenoid to get the docker image from
browsers.json
such asbrowser_version
instead ofversion
- Add another fake browser to
browsers.json
and set the beta to default, then just set thebrowserName
capability. The problem here is, selenoid checks for the browser names and if it does not matchchrome
,firefox
oropera
the selenoid container cannot be started. E.g.:
browserName=firefox-beta
"firefox-beta": {
"default": "beta",
"versions": {
"beta": {
"image": "my/path/to/firefox:beta",
"port": "4444"
}
}
}
Any help or further information will be greatly appreciated