Skip to main content

UI Library

Project description

CAFE-UI

CAFE-UI is a Python package that provides tools and utilities for web UI and mobile app testing. It is part of the CAFE (Core Automation Framework Enhancements) monorepo.

Features

CAFE-UI offers the following features:

  • Driver management: Supports various web browsers (Chrome, Firefox, Edge, etc.) and mobile platforms (iOS, Android).
  • Element interaction: Provides methods to interact with web elements and mobile app elements, such as clicking, typing, and retrieving text.
  • Assertions: Includes assertion methods specifically designed for UI testing, allowing for efficient validation of UI elements and behaviors.
  • Data-driven testing: Supports data-driven testing approaches to execute tests with different data sets.
  • Reporting: Integrates with CAFE's reporting capabilities to generate comprehensive test reports with screenshots and detailed logs.

Getting Started

Prerequisites

  • Python 3.12 or later
  • pip 24 or later (Python package manager)

Installation

  1. Install CAFE-UI using pip:

    pip install cafex-ui
    

Usage

CAFE-UI provides a set of intuitive methods and classes to facilitate UI testing. Here's a basic example for web UI testing:

from cafex_ui import web_client_actions

# Create a web client actions object
web_actions = web_client_actions.WebClientActions()

# Navigate to a website
web_actions.navigate("https://www.example.com")

# Find an element and click on it
element = web_actions.get_web_element("xpath=//button[text()='Submit']")
web_actions.click(element)

# Validate the page title
assert web_actions.get_title() == "Success Page"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

cafex_ui-1.0.0-py3-none-any.whl (51.6 kB view details)

Uploaded Python 3

File details

Details for the file cafex_ui-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: cafex_ui-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 51.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.10

File hashes

Hashes for cafex_ui-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4dfbb668f205138fafe9a31056a3bb2e86e2f616fc42f39b0c76ba1ae521cb1d
MD5 f6de018a2f7f889f5a735c30e6f8cf34
BLAKE2b-256 3feb786967ac319ff6a27ba32224cbefe9c19e235c644260e10894386a07fbc7

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