Skip to main content

easelenium - Selenium-based Test Automation Framework

Project description

easelenium

Build Status

Framework based on Selenium WebDriver. Contains wrapper around Selenium WebDriver functionaly and UI to facilitate in development.

Features:

  • Supports Firefox, Chrome, IE, Opera and PhantomJS.
  • Supports PageObject pattern
  • Supports Continuous Integration
  • Suits for novice users.
  • Supports only Python 3.6+(for older python versions check 0.3 tag)

Framework can be used as standalone framework with UI and/or as a library. Supportive classes:

GUI easelenium_ui.py:

  • Generator
  • Editor
  • Test runner

Dependencies

  1. Python
  2. wxPython
  3. Selenium WebDriver
  4. pytest
  5. pytest-html
  6. pytest-dotenv

Simple usage

Most of Browser functions support both WebElement object and tuple/list which represents html element. This tuple/list object should contain selector/locator as first element and value as a second element. Example: input = (By.NAME, 'q')

Here is simple example:

>>> from selenium.webdriver.common.by import By
>>> from easelenium.browser import Browser
>>> browser = Browser('ff') # initilizing browser
>>> browser.get('http://www.google.com') # going to google
>>> # creating variables for page elements:
>>> input = (By.NAME, 'q') # input element
>>> search_btn = (By.NAME, 'btnG') # search button element
>>> result = (By.CSS_SELECTOR, '.r') # found results titles' elements
>>> # back to action
>>> browser.type(input, u'selenium') # typing 'selenium' into search field
>>> browser.click(search_btn) # clicking search button
>>> browser.get_text(result) # getting first found title
u'Selenium - Web Browser Automation'
>>> browser.quit() # closing browser

Check browser_test.py for more examples.

Continuous Integration

Done via command line script easelenium_cli.py

Installation

Using pip

pip install easelenium

Manual

  1. Download latest code from GitHub
  2. Extract it
  3. Open terminal or command line console
  4. Navigate to extracted folder
  5. Install all required libraries
python -m pip install -r requirements.txt
  1. Go to easelenium folder and install with command:
python setup.py install

License

MIT License easelenium_license.txt

Tutorial

  1. Introduction
  2. Setup
  3. Test creation
  4. Continuous Integration

More information

Presentation

Thesis which contains description of the framework

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easelenium-0.5.tar.gz (34.2 kB view hashes)

Uploaded Source

Built Distribution

easelenium-0.5-py3-none-any.whl (85.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page