Skip to content

Commit

Permalink
added README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dmy.berezovskyi committed Oct 13, 2024
1 parent 1cf182e commit 50ee0d2
Showing 1 changed file with 47 additions and 2 deletions.
49 changes: 47 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,47 @@
# playwrite-pytest-framework
sample playwrite framework with pytest and poetry
# Playwright Pytest Framework

This sample framework is designed to facilitate automated testing of web applications using Playwright in combination with pytest. It provides a robust structure for writing and executing tests efficiently.

## Features

- **Cross-browser Testing**: Run tests on multiple browsers including Chromium, Firefox, and WebKit.
- **Headless Mode**: Easily run tests in headless mode for CI/CD integration.
- **Event Listeners**: Attach various event listeners to capture and log console messages, requests, responses, and clicks during tests.
- **Dynamic Configuration**: Use command-line options to customize test execution without modifying the code.
- **Screenshot Capture**: Automatically capture screenshots on test failures and embed them in the HTML report.
- **Logging**: Integrated logging for better tracking of test execution.

## Table of Contents

- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Command Line Options](#command-line-options)

## Requirements

- Python 3.12 or higher
- Playwright
- Pytest

## Installation

1. Clone the repository:

```bash
git clone https://github.com/dmberezovskyii/playwrite-pytest-framework.git
cd playwrite-pytest-framework
poetry shell
poetry install
```

## Command Line Options
The framework supports several command-line options to customize the test execution:

--env: Specify the environment (default: dev)
--browser-type: Choose the browser type (chromium, firefox, webkit, default: chromium)
--headless: Run tests in headless mode (default: False)
--devtools: Open the browser with devtools (default: False)
--proxy: Set a proxy server address (e.g., http://proxy-server:port)
--listeners: Comma-separated list of event listeners to attach (options: console, request, response, click)
--slow-mo: Slow down operations by the specified milliseconds (default: 0)

0 comments on commit 50ee0d2

Please sign in to comment.