python3-selenium for Debian
---------------------------

  Selenium requires a driver to interface with the chosen browser. Especially
  Firefox requires geckodriver in addition to the Debian package firefoxdriver.

  Geckodriver can be found at:
  <https://github.com/mozilla/geckodriver/releases>`. Make sure it's in your
  `PATH`, e. g., place it in `/usr/local/bin`.

  Not having geckodriver will result in the error
  `selenium.common.exceptions.WebDriverException: Message: 'geckodriver'
  executable needs to be in PATH.`

  For Chromium no additional download is required. Just install the
  chromium-driver package.

 -- Sascha Girrulat <sascha@girrulat.de>  Sat, 3 Feb 2018 22:54:09 +0100


python3-selenium >= 4.11.2+dfsg1 and Selenium Manager
-----------------------------------------------------

Upstream restructured the source code so the Selenium Manager is now needed
to act as a middle layer which will search for available driver interfaces.

Selenium Manager is a binary tool generated using Rust that provides
automated driver management for Google Chrome, Chromium, Mozilla Firefox,
and Microsoft Edge.

At the time of writing it's not packaged for Debian. In order to make
python3-selenium usable with this new circumstance you will need to adjust your
source in a way to choose the used driver directly and skip the calling of the
manager code in Selenium. Please have a look at the following example how to
archieve this.

  -----%<----

  # other includes
  from selenium.webdriver.chrome.service import Service as ChromeService

  # potential other existing python code in your application
  # to prepare your setup

  # set the to used driver, here as example for the chrome-driver
  service = ChromeService(executable_path="/usr/bin/chromedriver")
  # give the chosen driver as option to the intatioation of Chrome()
  driver = webdriver.Chrome(options = chrome_options, service = service)

  # more code potentially comes here

  ----->%----

You might want to look at the autopkgtest for python-selenium to see the
adaption of the manually setup for the driver to use.

https://sources.debian.org/src/python-selenium/4.11.2%2Bdfsg-1/debian/tests/test-chromium/

 -- Carsten Schoenert <c.schoenert@t-online.de>  Fri, 1 Sep 2023 21:33:09 +0530
