Skip to content

julientoucoula17/AutomatedSelenium-Python-WordPress

Repository files navigation

Automated Selenium with Python on WordPress

This code uses selenium for web browser automation and a module of Python who extract the data.

Code Requirements

The example code is in Python (version 3.6 or higher will work).

  1. import selenium (For more information, see)
  2. import time
  3. import xlrd (module is used to extract data from a spreadsheet)
ex: pip install selenium

Description

Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. 🌐 Through Selenium Python API you can access all functionalities of Selenium WebDriver in an intuitive way.

Selenium Python bindings provide a convenient API to access Selenium WebDrivers like Firefox, Ie, Chrome, Remote etc. The current supported Python versions are 2.7, 3.5 and above. 💫

Drivers

Selenium requires a driver to interface with the chosen browser. Firefox, for example, requires geckodriver, which needs to be installed before the below examples can be run. Make sure it’s in your PATH, e. g., place it in /usr/bin or /usr/local/bin.

Failure to observe this step will give you an error selenium.common.exceptions.WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH.

Other supported browsers will have their own drivers available. Links to some of the more popular browser drivers follow.

  1. Firefox: https://github.com/mozilla/geckodriver/releases
  2. Chrome: https://sites.google.com/a/chromium.org/chromedriver/downloads
  3. Edge: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
  4. Safari: https://webkit.org/blog/6900/webdriver-support-in-safari-10

Application

I used it for internship for add users who were in a spreadsheet on wordpress.

Execution

To run the code, type python Automated_Add_User.py

python Automated_Add_User.py

Releases

No releases published

Packages

No packages published

Languages