Skip to main content

Promethee-Selenium: A POM-based automated UI test library

Project description

Promethee-Selenium

[English version below | Version française plus bas]


🇬🇧 English Description

A robust, Page Object Model (POM) based library for automated UI testing using Selenium and Pytest.

This library is designed to help you write maintainable and scalable end-to-end tests with minimal boilerplate.

Features

  • Page Object Model (POM): Structured architecture separating page logic from test logic.
  • Scaffolding CLI: Quickly initialize a new project with best-practice directory structure using promethee-selenium init.
  • Built-in Utilities: Ready-to-use helpers for Waiting, Clicking, Filling inputs (via selenium-ui-test-tool).
  • Environment Management: Easy handling of test data and credentials.
  • Documentation: Includes HTML documentation to help you get started.

Installation

Install the package via pip:

pip install promethee-selenium

Getting Started

  1. Create a new folder for your test project:

    mkdir my_test_project
    cd my_test_project
    
  2. Initialize the project structure:

    promethee-selenium init
    

    To view the documentation in your browser:

    promethee-selenium docs
    

    Or use the shortcut:

    promethee-selenium-docs
    

    This will create:

    • scenarios/: For your Page Objects.
    • tests/: For your test scripts.
    • data/: For credentials and test data.
    • utils/: For local utilities.
    • conftest.py: Pytest configuration.
  3. Run the sample test:

    pytest tests/
    

Writing a Page Object

Inherit from the Base class provided by the library:

from promethee-selenium.base import Base
from selenium.webdriver.common.by import By
# Uses selenium-ui-test-tool functions internally

class LoginPage(Base):
    def fill_form(self, username, password):
        self.fill_input(By.ID, "username", username)
        self.fill_input(By.ID, "password", password)
        self.click_element(By.ID, "submit-btn")

For more details, check the generated docs/index.html after installation.


🇫🇷 Description Française

Une librairie robuste basée sur le modèle Page Object Model (POM) pour l'automatisation de tests UI avec Selenium et Pytest.

Cette librairie est conçue pour vous aider à écrire des tests de bout en bout maintenables et évolutifs avec un minimum de code répétitif.

Fonctionnalités

  • Page Object Model (POM) : Architecture structurée séparant la logique de la page de la logique de test.
  • CLI d'initialisation : Initialisez rapidement un nouveau projet avec une structure recommandée via promethee-selenium init.
  • Utilitaires intégrés : Fonctions prêtes à l'emploi pour attendre, cliquer, remplir des champs (via selenium-ui-test-tool).
  • Gestion d'environnement : Gestion facile des données de test et des identifiants.
  • Documentation : Inclut une documentation HTML pour vous aider à démarrer.

Installation

Installez le paquet via pip :

pip install Promethee-Selenium

Démarrage Rapide

  1. Créez un nouveau dossier pour votre projet de test :

    mkdir mon_projet_test
    cd mon_projet_test
    
  2. Initialisez la structure du projet :

    promethee-selenium init
    

    Pour afficher la documentation dans votre navigateur :

    promethee-selenium docs
    

    Ou utilisez le raccourci :

    promethee-selenium-docs
    

    Cela va créer :

    • scenarios/ : Pour vos Page Objects.
    • tests/ : Pour vos scripts de test.
    • data/ : Pour les identifiants et données de test.
    • utils/ : Pour les utilitaires locaux.
    • conftest.py : Configuration Pytest.
  3. Lancez le test d'exemple :

    pytest tests/
    

Écrire un Page Object

Héritez de la classe Base fournie par la librairie :

from promethee.base import Base
from selenium.webdriver.common.by import By
# Utilise les fonctions selenium-ui-test-tool en interne

class LoginPage(Base):
    def fill_form(self, username, password):
        self.fill_input(By.ID, "username", username)
        self.fill_input(By.ID, "password", password)
        self.click_element(By.ID, "submit-btn")

Pour plus de détails, consultez le fichier docs/index.html généré après l'installation.

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

promethee_selenium-1.0.3.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

promethee_selenium-1.0.3-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file promethee_selenium-1.0.3.tar.gz.

File metadata

  • Download URL: promethee_selenium-1.0.3.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for promethee_selenium-1.0.3.tar.gz
Algorithm Hash digest
SHA256 51bcf260e84b20ba2f26b338b2cb1367b64e1505d5ae32799688d3849432e8f8
MD5 eaad22881940f39660b7451a5d679a27
BLAKE2b-256 2fb039e4b9df2038336d609954672c58031abda4e81a40c5e625acaec93b443a

See more details on using hashes here.

File details

Details for the file promethee_selenium-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for promethee_selenium-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 63448cbf37b636ba2ba45a8d6e9248dcb3c466b47b6d6b18ca27a3225d044d37
MD5 1bb4f3319606fdc755d619f502d0dbad
BLAKE2b-256 514a18745cba3311cac846ea3056ff5c2c11d962b0f80fa158b9c8190095bbff

See more details on using hashes here.

Supported by

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