Skip to main content

Visual Testing and Get Ids utilities for Selenium & Appium

Project description

xlavm-lib

Librería orientada a pruebas automatizadas de Python (Pytest) con Selenium y Appium.

Esta libreria se enfoca en 3 partes fundamentales:

  • Pruebas Visuales
  • Obtencion de accessibility id o xpath (Sin necesidad de inspeccionar elementos)
  • Reportes en Allure (Local y en Browserstack)

Instalación

pip install xlavm-lib

Visual Testing

  1. En conftest.py:

    @pytest.fixture
    def driver():
        driver.quit()
        from xlavm_lib import VisualTestReport
        VisualTestReport().exec()
    
  2. En cualquier parte donde se quiera realizar una prueba visual:

    from xlavm_lib import VisualTest
    VisualTest(self.driver, 'nombre_pagina').exec()
    

Get Ids

  1. En cualquier parte donde se quiera obtener los elements ids de una pagina:
from xlavm_lib import GetIds
GetIds(self.driver, 'nombre_pagina').exec()

Allure Reports

  1. En conftest.py:

    @pytest.fixture
    def driver(request):
        request.node.report = AllureReport(driver)
        yield driver
    
    from xlavm_lib import AllureReport
    # HOOKS
    def pytest_runtest_call(item):
        report = getattr(item, "report", None)
        if report:
            report.start_record_video()
                
    def pytest_runtest_teardown(item):
        report = getattr(item, "report", None)
        if report:
            report.stop_record_video()
    
  2. En .env:

    BROWSERSTACK_USERNAME = "tu_username"
    BROWSERSTACK_ACCESS_KEY = "tu_access_key"
    
  3. En cualquier parte donde se quiera usar el reporte:

    from xlavm_lib import AllureReport
    AllureReport(driver).step("1. Ingreso credenciales validas", request.node.name) #toma pantallazo por cada paso
    AllureReport(driver).info("este es un mensaje infomativo")
    AllureReport(driver).error("este es un mensaje de error")
    

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

xlavm_lib-1.5.1.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

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

xlavm_lib-1.5.1-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file xlavm_lib-1.5.1.tar.gz.

File metadata

  • Download URL: xlavm_lib-1.5.1.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for xlavm_lib-1.5.1.tar.gz
Algorithm Hash digest
SHA256 aba00ea3505a419cbe3b6c2b59d7110fd2a4119c8ffb7871b0568ce76a7f448d
MD5 e9d3293451f6c2a887850b9564b5846c
BLAKE2b-256 bdd80f6ad2e1d4f1d0a4cb18d8faa3cf55ddc1bba09db8d0e0b27b261b68516c

See more details on using hashes here.

File details

Details for the file xlavm_lib-1.5.1-py3-none-any.whl.

File metadata

  • Download URL: xlavm_lib-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for xlavm_lib-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8b27343e26b70ed50ffd92b8c64e821ef2c96fec8042890f3ce26b164a6493da
MD5 697a6e7b6f71203d9bddca7b9d09ba27
BLAKE2b-256 07159a1c7e397ee1c1199ac17699a4845f516bdbca5cfe058c322756f080147e

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