Git Product home page Git Product logo

seleniumpom's Introduction

Selenium POM


โœจ Web Automation Testing using Selenium WebDriver, Python, & POM design pattern โœจ

Preparation

What will be used on this project

Item Source
Editor VS Code (https://code.visualstudio.com/download)
Package Manager PIP (https://pip.pypa.io/en/stable/getting-started/)
UI Test Tools Selenium WebDriver with Python (https://pypi.org/project/selenium/)
WebDriver Manager (https://pypi.org/project/webdriver-manager/)
Design Pattern Selenium POM or Page Object Model
Test Reporter Pytest HTML (https://pytest-html.readthedocs.io/en/latest/)
Browser Latest version of Chrome / Mozilla Firefox

Pre-Requisite Installation

Install VS Code Editor, Python, and PIP

To check whether you already installed Python & PIP

python --version
python -m pip --version 

Testing Tools Installation

Install Selenium

python -m pip install Selenium

Install Web Driver Manager

python -m pip install webdriver-manager

Setting up Project

Clone

๐Ÿ‘‰ Clone this Repository through Terminal or Command Prompt

Open the Project on Editor

Open this Automation Project using VS Code Editor.

Run the Automation Project

Change to Project directory on Terminal or Command Prompt

cd SeleniumPOM

Run Specific Test Execution on Terminal

python -m unittest TestCases/test_login.py

Run All Test Execution on Terminal

python -m unittest

Note: By default the Tests run on Chrome Browser

To run on Firefox Browser, change the browser on TestCases/test_login.py and TestCases/test_product.py file

   # self.browser = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))
   self.browser = webdriver.Firefox(service=FirefoxService(GeckoDriverManager().install()))

Generate Test Execution HTML Report

Install Pytest-HTML Reporter

python -m pip install pytest-html

Run Selenium with the HTML Reporter

Note: Please wait until all test execution finished

python -m pytest --html=report.html

Test Execution HTML Report available on SeleniumPOM/report.html

seleniumpom's People

Contributors

fatimazza avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.