Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 396a7bb

Browse files
committed
rearrange sections
1 parent 6a8866a commit 396a7bb

File tree

1 file changed

+53
-57
lines changed

1 file changed

+53
-57
lines changed

source/installation.rst

Lines changed: 53 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,71 @@ This documentation explains Selenium 2 WebDriver API. Selenium 1 / Selenium RC
1818
API is not covered here.
1919

2020

21-
Downloading Python bindings for Selenium
22-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23-
21+
Installing Python bindings for Selenium
22+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2423

25-
Use `pip <https://pip.pypa.io/en/latest/installing/>`_ to install the selenium
26-
package. Python 3.6 has pip available in the `standard library
27-
<https://docs.python.org/3.6/installing/index.html>`_. Using `pip`, you can
24+
Use `pip <https://pip.pypa.io/en/latest/installation/>`_ to install the selenium
25+
package. Python 3 has pip available in the `standard library
26+
<https://docs.python.org/3/installing/index.html>`_. Using `pip`, you can
2827
install selenium like this::
2928

3029
pip install selenium
3130

32-
You may consider using `virtualenv <http://www.virtualenv.org>`_ to create
33-
isolated Python environments. Python 3 has `venv
31+
You may consider using `virtualenv <https://virtualenv.pypa.io/en/latest/>`_ to
32+
create isolated Python environments. Python 3 has `venv
3433
<https://docs.python.org/3/library/venv.html>`_ which is almost the same as
3534
virtualenv.
3635

3736
You can also download Python bindings for Selenium from the `PyPI page for
3837
selenium package <https://pypi.python.org/pypi/selenium>`_. and install
3938
manually.
4039

40+
41+
Instructions for Windows users
42+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43+
44+
1. Install Python 3 using the `MSI available in python.org download page
45+
<http://www.python.org/download>`_.
46+
47+
2. Start a command prompt using the ``cmd.exe`` program and run the ``pip``
48+
command as given below to install `selenium`.
49+
50+
::
51+
52+
C:\Python39\Scripts\pip.exe install selenium
53+
54+
Now you can run your test scripts using Python. For example, if you have
55+
created a Selenium based script and saved it inside
56+
``C:\my_selenium_script.py``, you can run it like this::
57+
58+
C:\Python39\python.exe C:\my_selenium_script.py
59+
60+
61+
Installing from Git sources
62+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
63+
64+
To build Selenium Python from the source code, clone `the official repository
65+
<https://github.com/SeleniumHQ/selenium.git>`_. It contains the source code for
66+
all official Selenium flavors, like Python, Java, Ruby and others. The Python
67+
code resides in the ``/py`` directory. To build, you will also need the `Bazel
68+
<https://www.bazel.build>`_ build system.
69+
70+
.. note::
71+
72+
Currently, as Selenium gets near to the 4.0.0 release, it requires Bazel 3.2.0
73+
(`Install instructions
74+
<https://docs.bazel.build/versions/3.2.0/install.html>`_), even though 3.3.0
75+
is already available.
76+
77+
To build a Wheel from the sources, run the following command from the repository
78+
root::
79+
80+
bazel //py:selenium-wheel
81+
82+
This command will prepare the source code with some preprocessed JS files needed
83+
by some webdriver modules and build the ``.whl`` package inside the
84+
``./bazel-bin/py/`` directory. Afterwards, you can use ``pip`` to install it.
85+
4186
Drivers
4287
~~~~~~~
4388

@@ -68,29 +113,6 @@ For more information about driver installation, please refer the `official
68113
documentation
69114
<https://www.selenium.dev/documentation/en/webdriver/driver_requirements/>`_.
70115

71-
Detailed instructions for Windows users
72-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73-
74-
.. Note::
75-
76-
You should have an internet connection to perform this installation.
77-
78-
1. Install Python 3.6 using the `MSI available in python.org download page
79-
<http://www.python.org/download>`_.
80-
81-
2. Start a command prompt using the ``cmd.exe`` program and run the ``pip``
82-
command as given below to install `selenium`.
83-
84-
::
85-
86-
C:\Python35\Scripts\pip.exe install selenium
87-
88-
Now you can run your test scripts using Python. For example, if you have
89-
created a Selenium based script and saved it inside
90-
``C:\my_selenium_script.py``, you can run it like this::
91-
92-
C:\Python35\python.exe C:\my_selenium_script.py
93-
94116

95117
Downloading Selenium server
96118
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -130,29 +152,3 @@ command. Similarly, you can provide a relative or absolute path to Selenium
130152
server jar file. Then, the command will look something like this::
131153

132154
/path/to/java -jar /path/to/selenium-server-standalone-2.x.x.jar
133-
134-
135-
Installing from Git sources
136-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
137-
138-
To build Selenium Python from the source code, clone `the official repository
139-
<https://github.com/SeleniumHQ/selenium.git>`_. It contains the source code for
140-
all official Selenium flavors, like Python, Java, Ruby and others. The Python
141-
code resides in the ``/py`` directory. To build, you will also need the `Bazel
142-
<https://www.bazel.build>`_ build system.
143-
144-
.. note::
145-
146-
Currently, as Selenium gets near to the 4.0.0 release, it requires Bazel 3.2.0
147-
(`Install instructions
148-
<https://docs.bazel.build/versions/3.2.0/install.html>`_), even though 3.3.0
149-
is already available.
150-
151-
To build a Wheel from the sources, run the following command from the repository
152-
root::
153-
154-
bazel //py:selenium-wheel
155-
156-
This command will prepare the source code with some preprocessed JS files needed
157-
by some webdriver modules and build the ``.whl`` package inside the
158-
``./bazel-bin/py/`` directory. Afterwards, you can use ``pip`` to install it.

0 commit comments

Comments
 (0)