0

I have the following configuration file browsers.json:

{
    "chrome": {
        "default": "69.0",
        "versions": {
            "60.0": {
                "image": "selenoid/chrome:60.0",
                "port": "4444",
                "path": "/",
                "tmpfs": {
                    "/tmp": "size=128m"
                }
            },
            "69.0": {
                "image": "selenoid/chrome:69.0",
                "port": "4444",
                "path": "/",
                "tmpfs": {
                    "/tmp": "size=128m"
                }
},
    "firefox": {
        "default": "60.0",
        "versions": {
            "50.0": {
                "image": "selenoid/firefox:50.0",
                "port": "4444",
                "path": "/wd/hub",
                "tmpfs": {
                    "/tmp": "size=128m"
                }
            },
            "60.0": {
                "image": "selenoid/firefox:60.0",
                "port": "4444",
                "path": "/wd/hub",
                "tmpfs": {
                    "/tmp": "size=128m"
        }
            }
        }
    },

In tests I have the following code:

capabilities = {
                "browserName": "chrome",
                "version": "60.0"
            }
            options = webdriver.ChromeOptions()
            options.add_argument('--ignore-certificate-errors')
            options.add_argument('--no-sandbox')
            self.driver = webdriver.Remote(
                command_executor="http://localhost:4444/wd/hub",
                desired_capabilities=capabilities, options=options)

question: why can't I run specific browser version? It gives me exception:

WebDriverException: Message: Requested environment is not available

If I don't specify version in capabilities, test runs successfully.

president
  • 503
  • 1
  • 3
  • 18

1 Answers1

0

As I have already said in Github issue and in AT forum - your config and code seem to be correct. Make sure your config file is used by Selenoid (either restart its container or do docker kill -s HUP selenoid). If that does not help - notice ENVIRONMENT_NOT_AVAILABLE messages in Selenoid log, they specify which browser name and version in fact arrive to Selenoid from your tests.

vania-pooh
  • 2,933
  • 4
  • 24
  • 42