robocorp / rpaframework

Collection of open-source libraries and tools for Robotic Process Automation (RPA), designed to be used with both Robot Framework and Python
https://www.rpaframework.org/
Apache License 2.0
1.17k stars 225 forks source link

`RPA.Browser.Selenium`: Correctly detect browser version if a custom browser path is provided #1124

Open cmin764 opened 1 year ago

cmin764 commented 1 year ago

When a custom browser binary path location is provided with the binary_location field through the passed options param, while the "targeted browser version" log is retrieved and displayed according to this, the downloaded webdriver doesn't take into account this custom path and still relies on the default one.

Steps to reproduce

  1. Have on the system the same browser twice, but with different versions.
  2. Pass through binary_location the path of the non-default browser.
  3. Effect: the version is pulled from the default one and is used to download a webdriver which might be incompatible with the selected custom different-in-version browser passed through the option.

⚠️ But first of all, you shouldn't have two identical browsers on the same machine of different versions. (and it's rare to find the need to pass a custom binary location as the browser is usually auto-detected by the webdriver itself)