项目作者: joydeep100

项目描述 :
Selenium implementation with Python & Behave!
高级语言: Python
项目地址: git://github.com/joydeep100/pysel.git
创建时间: 2020-03-10T13:21:40Z
项目社区:https://github.com/joydeep100/pysel

开源协议:

下载


Selenium implementation with Python, POM & BDD!

This is purely a Selenium Framework, attempted to keep it as simple as possible and also by making use of some of best know practices of Test Automation.

Environment

  • Linux / Mac / Windows

Libraries Used.

  • Selenium
  • Behave (BDD)
  • Python3

Behave techniques used

  • Tags
  • Fixtures (Setup and Teardown)
  • Features
  • Scenarios

Python techniques used

  • Page Object Model
  • Multi level Inheritance
  • Static methods

Selenium techinques used

  • Action chains
  • Writing wrapper functions for cumbersome selnium API’s :(
  • Added a custom locating method using text of the element (used xpath internally)

How to run

Pre-Requisites.

  1. Python3
  2. Webdriver’s be downloaded and kept in system PATH
  3. Define the browser type in common/variables.pyfile (chrome / firefox)
  4. Install the libraries mentioned in requirement.txt using the commandpip install -r requirements.txt

Use any of the below commands to run

  1. Go to the parent directory (ie. pysel)
  2. type behave and hit enter. // To run all the scenarios
    or
  3. type behave --tags='regression' -k and hit enter // To run only tests which are using @regression tag