File: python3-selenium.README.Debian

package info (click to toggle)
python-selenium 4.24.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,404 kB
  • sloc: python: 14,901; javascript: 2,347; makefile: 124; sh: 52
file content (59 lines) | stat: -rw-r--r-- 2,275 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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