Metadata-Version: 2.4
Name: cafex-ui
Version: 1.0.0
Summary: UI Library
Author-email: QA Automation Team <qa_automation@gmail.com>
Project-URL: Homepage, https://example.com
Project-URL: Documentation, https://readthedocs.org
Project-URL: Repository, https://github.com/me/spam.git
Project-URL: Issues, https://github.com/me/spam/issues
Project-URL: Changelog, https://github.com/me/spam/blob/master/CHANGELOG.md
Keywords: ui,appium,selenium,pytest,automation
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: cafex-core>=1.0.0
Requires-Dist: selenium==4.26.1
Requires-Dist: Appium-Python-Client==4.0.1
Requires-Dist: browserstack-local==1.2.7
Requires-Dist: opencv-python==4.10.0.84
Requires-Dist: playwright==1.54.0

# 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:

```python
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"
