-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Description
Description
We have a standalone grid setup on a Rocky Linux server using selenium-manager to automatically download and manage browsers.
Manager successfully keeps the browsers up to date for both firefox and chrome and we can run tests in the grid with the browser version set to "stable".
Selenium manager has a cache of the previously downloaded browsers available, however if we try and use one of these older versions by setting a specific version in the browser capabilities, selenium grid will launch a "queued" session as it doesn't think that version is available - manager knows it's already there, and the process times out like below:
(We've tried this with both chrome and firefox specific version numbers)
Exception: Curl error thrown for http POST to /session with params: {"capabilities":{"firstMatch":[{"browserName":"chrome","goog:chromeOptions":{"prefs":{"download.default_directory":"/home/testbot/Testing/AppTests/downloads","download.prompt_for_download":false,"download.directory_upgrade":true,"safebrowsing.enabled":true},"args":["--disable-infobars","--hide-scrollbars","--window-size=1280,800","--headless","--verbose"]},"browserVersion":"141.0.7390.122"}]},"desiredCapabilities":{"browserName":"chrome","platform":"ANY","goog:chromeOptions":{"prefs":{"download.default_directory":"/home/testbot/Testing/AppTests/downloads","download.prompt_for_download":false,"download.directory_upgrade":true,"safebrowsing.enabled":true},"args":["--disable-infobars","--hide-scrollbars","--window-size=1280,800","--headless","--verbose"]},"version":"141.0.7390.122"}}
Operation timed out after 60001 milliseconds with 0 bytes received
#0 /home/testbot/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php(328): Facebook\WebDriver\Exception\Internal\WebDriverCurlException::forCurlError()
#1 /home/testbot/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php(129): Facebook\WebDriver\Remote\HttpCommandExecutor->execute()
#2 /home/testbot/Testing/AppFramework/AppDriver.php(215): Facebook\WebDriver\Remote\RemoteWebDriver::create()
#3 /home/testbot/Testing/AppFramework/AppTestBase.php(106): Facebook\WebDriver\AppDriver::build()
#4 /home/testbot/vendor/phpunit/phpunit/src/Framework/TestSuite.php(635): Facebook\WebDriver\AppTestBase::setUpBeforeClass()
#5 /home/testbot/vendor/phpunit/phpunit/src/Framework/TestSuite.php(351): PHPUnit\Framework\TestSuite->invokeMethodsBeforeFirstTest()
#6 /home/testbot/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run()
#7 /home/testbot/vendor/phpunit/phpunit/src/TextUI/Application.php(204): PHPUnit\TextUI\TestRunner->run()
#8 /home/testbot/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run()
#9 /home/testbot/vendor/bin/phpunit(122): include('...')
#10 {main}
If we disable selenium-manager and disable "detect-drivers" in the selenium.toml file, then add a static "node.driver-configuration" pointed to an old version cached by selenium-manager we can then launch that version of a browser fine.
Below successfully allows Chrome to launch with version set to "141"
[[node.driver-configuration]]
display-name = "Chrome 141"
stereotype = "{\"browserName\": \"chrome\", \"browserVersion\": \"141\", \"platformName\": \"linux\", \"goog:chromeOptions\": {\"binary\": \"/opt/selenium/cache/chrome/linux64/141.0.7390.122/chrome\"}}"
webdriver-executable = '/opt/selenium/cache/chromedriver/linux64/141.0.7390.122/chromedriver'
When running selenium manager the grid overview UI shows each browser with just "browserName" and "platformName" populated in the info as you hover over each, there are no version details present.
Without selenium manager and using the static configuration you see all the data set up in the stereotype - including the browserVersion. I'm guessing that without that being present in the dynamic manager config the grid server isn't able to match them
Reproducible Code
Just try running an old version of a browser with a standalone grid configured to use selenium-manager to auto download and manage the browsers