Installing Selenium Webdriver Python Package
There
are different way to set up Selenium
WebDriver with Python
If
you have pip on your system, you can simply install or upgrade the Python
bindings:
PIP:
It will download the latest version of the packages and install it on your
machine.
-U
: The optional –U will upgrade to the
latest version of the existing installed package.
Option
1:
1. First go to the directory
where you’ve installed Python. Type below command at command line
pip install
selenium
Ex: C:\python\pythonLatest>pip
install Selenium
if
you want to upgrade the currently installed selenium Webdriver package. Just
you need to add -U
ex:
pip install -U Selenium
Note
: if you have already Latest Version of Selenium Webdriver it will return the status
as Already up-to-date
Option2:
Alternately,
you can download the source distribution from PyPI (e.g.
selenium-x.xxx.x.tar.gz), unarchive it, and run:
1 Download the Selenium
source code bundle from the below link.
Extract the source into
the folder(Ex: selenium-Latest).
Navigate to Command Line
and type the below command
EX:
C:\python\pythonLatest>cd selenium-Latest
C:\python\pythonLatest\selenium-Latest>python setup.py install
How to Install Selenium WebDriver Package in PyCharm IDE
1) Select Settings.. under File menu
2) Select the Project Interpreter under Project:<Project Name>
EX:
C:\python\pythonLatest>cd selenium-Latest
C:\python\pythonLatest\selenium-Latest>python setup.py install
How to Install Selenium WebDriver Package in PyCharm IDE
1) Select Settings.. under File menu
2) Select the Project Interpreter under Project:<Project Name>
3) Select the Project Name in
the Project List in Right side box for installing the Packages
Ex:
examples
4) Click on the + sign
5) It will open Available
Packages windows then type which Package you want (Ex: Selenium) then click on
Install Package button in the bottom of the window.
Drivers
Selenium requires a driver to interface with the chosen browser. Firefox, for example, requires gecko driver, which needs to be installed before the executing your scripts.
Download the browser drivers from below link:
https://www.seleniumhq.org/download/
Now you are ready to create and run your simple Selenium scripts with Python.
Drivers
Selenium requires a driver to interface with the chosen browser. Firefox, for example, requires gecko driver, which needs to be installed before the executing your scripts.
Download the browser drivers from below link:
https://www.seleniumhq.org/download/
Now you are ready to create and run your simple Selenium scripts with Python.
Comments
Post a Comment