The Selenium Python binding provides a simple API to write feature/acceptance tests using Selenium webdriver. With the selenium Python API, we have intuitive access to all the features of the selenium webdriver. The Selenium Python binding provides a convenient API to access and manipulate browsers, such as Firefox,ie,chrome. The Python version currently supported is 2.7,3.5 and later.
First, install the Python selenium binding
Install Selenium
Second, install the browser driver
Chrome: https://sites.google.com/a/chromium.org/chromedriver/downloads
Edge: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
Firefox: https://github.com/mozilla/geckodriver/releases
Safari: https://webkit.org/blog/6900/webdriver-support-in-safari-10/
Using a different browser, you need to download the corresponding driver, and make sure to drive the executable file, such as chromedriver.exe into your system environment path, where I put it in the Python installation directory. D:\360YP\VM\Python35\chromedriver.exe
Third, download Selenium Server
Note: The Selenium server is a required if want to use the remote Webdriver
Selenium Server is a Java program that is recommended to run with the Java environment above JRE 1.6. We can download selenium Standalone Server from download page of selenium website, with the name similar to Selenium-server-standalone-3.5.0.jar, starting in such a way as
Java-jar selenium-server-standalone-3.5. 0. jar
For details, please see the following sections.
Selenium with Python 001-Installation Chapter