Solved

Is it possible to use a specific Selenium version?

  • 17 February 2021
  • 1 reply
  • 21 views

Badge

We found that some automated test cases encounter a bug related to a specific Selenium version. Is it possible to explicitly specify a version of Selenium where this bug no longer occurs?  

icon

Best answer by SauceBot 18 March 2021, 02:30

View original

1 reply

Is it possible?

Yes, and it’s quite easy!

 

When do I need to set Selenium Version and when do I need to set other Driver Versions?

It depends what browser you’re using.  Some browsers provide built in Selenium driver, or use a driver instead of Selenium itself.  It’s broken down by browser, below:

 

How To Do It

Set the Selenium Version

Set the seleniumVersion desired capability to the driver version you’re after.  (See selenium version in the documentation for more information and to check the defaults).

 

Edge

The version of EdgeDriver used is specifically tied to the version of Edge in operation.  For instance, Edge version 89 is only compatible with Edge Driver 89.0.774.63, 89.0.774.57 and 89.0.774.54.  As such, you should only change the EdgeDriver version to one of the other point releases, and only then if you have a specific need it addresses.  You can change the EdgeDriver version using the edgedriverVersion capability, as part of the sauce:options capability.

 

Chrome

Similarly to Edge, ChromeDriver versions are tied to the version of Chrome in use, and you should only change to a matching point release if you have a specific need.  You can do so with the the chromedriverVersion capability, as part of sauce:options. (See chrome driver version in the documentation for more information and to check the defaults).

Additionally, you can’t specify a Selenium version for Chrome.

 

Set the IE Driver Version

Set the iedriverVersion desired capability.  We recommend setting the seleniumVersion desired capability to the same version.  (See the IE driver version in the documentation for more information and to check the defaults).

 

Set the Firefox Driver Version

Sorry!  The Firefox Driver version is fixed, based on whether you’re running a Selenium 2 or Selenium 3 session.  You can find details in the documentation.

 

What about Live Tests?

Unfortunately, you can’t set the Selenium version for live tests at this time.

Reply