Skip to content

Kpastam/Selenium-Pytest-Login-Tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selenium Pytest Login Tests

This repository contains automated tests for login functionality using Selenium WebDriver and pytest in Python.


Project Overview

These tests cover:

  • Valid login scenario (with correct username and password)
  • Invalid login scenario (with incorrect credentials)

The tests use Selenium to automate Chrome browser and verify login behavior on the demo site:
https://the-internet.herokuapp.com/login


Prerequisites

  • Python 3.6 or above
  • Google Chrome browser installed
  • ChromeDriver installed and available in your system PATH
    (Make sure the ChromeDriver version matches your Chrome browser version)

Setup

  1. Clone this repository:
git clone https://github.com/yourusername/your-repo-name.git
cd your-repo-name
pip install -r requirements.txt

Run all tests:pytest
Run a specific test file, e.g. valid login test: pytest tests/test_login_valid.py
Generate an HTML report: pytest --html=reports/report.html

Project Structure
├── pages/
│   └── login_page.py       # Page Object Model for login page
├── tests/
│   ├── test_login_valid.py   # Test for valid login
│   └── test_login_invalid.py # Test for invalid login
├── reports/                # HTML test reports (auto-generated)
├── requirements.txt        # Python dependencies (if added)
└── README.md               # This file

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published