@@ -47,24 +47,32 @@ Several browsers are supported, as well as the Remote protocol:
47
47
Installing
48
48
==========
49
49
50
- If you have `pip <https://pip.pypa.io/ >`_ on your system, you can simply install or upgrade the Python bindings::
50
+ Install or upgrade the Python bindings with `pip <https://pip.pypa.io/> `.
51
+
52
+ Latest official release::
51
53
52
54
pip install -U selenium
53
55
54
- You may want to consider using a `virtual environment <https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments >`_
55
- to create isolated Python environments.
56
+ Nightly development release::
57
+
58
+ pip install -U --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ selenium
59
+
60
+ Note: you should consider using a
61
+ `virtual environment <https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments >`_
62
+ to create an isolated Python environment for installation.
56
63
57
64
Drivers
58
65
=======
59
66
60
67
Selenium requires a driver to interface with the chosen browser (chromedriver, edgedriver, geckodriver, etc).
61
68
62
- In older versions of Selenium, it was necessary to install and manage these drivers yourself. You had to make sure the driver
63
- executable was available on your system `PATH `, or specified explicitly in code. Modern versions of Selenium handle browser and
64
- driver installation for you with `Selenium Manager <https://www.selenium.dev/documentation/selenium_manager >`_. You generally
65
- don't have to worry about driver installation or configuration now that it's done for you when you instantiate a WebDriver.
66
- Selenium Manager works with most supported platforms and browsers. If it doesn't meet your needs, you can still install and
67
- specify browsers and drivers yourself.
69
+ In older versions of Selenium, it was necessary to install and manage these drivers yourself. You had to make sure the
70
+ driver executable was available on your system `PATH `, or specified explicitly in code. Modern versions of Selenium
71
+ handle browser and driver installation for you with
72
+ `Selenium Manager <https://www.selenium.dev/documentation/selenium_manager >`_. You generally don't have to worry about
73
+ driver installation or configuration now that it's done for you when you instantiate a WebDriver. Selenium Manager works
74
+ with most supported platforms and browsers. If it doesn't meet your needs, you can still install and specify browsers
75
+ and drivers yourself.
68
76
69
77
Links to some of the more popular browser drivers:
70
78
@@ -123,8 +131,8 @@ Example 1:
123
131
Example 2:
124
132
==========
125
133
126
- Selenium WebDriver is often used as a basis for testing web applications. Here is a simple example using Python's standard
127
- `unittest <http://docs.python.org/3/library/unittest.html >`_ library:
134
+ Selenium WebDriver is often used as a basis for testing web applications. Here is a simple example using Python's
135
+ standard `unittest <http://docs.python.org/3/library/unittest.html >`_ library:
128
136
129
137
.. code-block :: python
130
138
@@ -150,8 +158,8 @@ Selenium Grid (optional)
150
158
151
159
For local Selenium scripts, the Java server is not needed.
152
160
153
- To use Selenium remotely, you need to also run the Selenium grid.
154
- For information on running Selenium Grid: https://www.selenium.dev/documentation/grid/getting_started/
161
+ To use Selenium remotely, you need to also run a Selenium Grid. For information on running Selenium Grid:
162
+ https://www.selenium.dev/documentation/grid/getting_started/
155
163
156
164
To use Remote WebDriver see: https://www.selenium.dev/documentation/webdriver/drivers/remote_webdriver/?tab=python
157
165
@@ -167,15 +175,14 @@ View source code online:
167
175
Contributing
168
176
=============
169
177
170
- - Fork the selenium repo and clone it locally
178
+ - Fork the selenium repo
179
+ - Clone your fork locally
171
180
- Create a branch for your work
172
- - Run: `git checkout -b my-cool-branch-name `
181
+ - `git checkout -b my-cool-branch-name `
173
182
- Create a virtual environment and install tox
174
- - Run: `python -m venv venv && source venv/bin/activate && pip install tox `
183
+ - `python -m venv venv && source venv/bin/activate && pip install tox `
175
184
- Make your changes
176
- - Run: `tox -e linting `
185
+ - Run the linter/formatter
186
+ - `tox -e linting `
177
187
- If tox exits `0 `, commit and push. Otherwise, fix the newly introduced style violations
178
- - `flake8 ` requires manual fixes
179
- - `black ` will rewrite the violations automatically, however the files are unstaged and should be staged again
180
- - `isort ` will rewrite the violations automatically, however the files are unstaged and should be staged again
181
188
- Submit a Pull Request
0 commit comments