Skip to main content

TAFLEX PY

Enterprise Test Automation Framework in Python


🎯 What is TAFLEX PY?

TAFLEX PY is a unified, enterprise-grade test automation framework designed for testing Web, API, and Mobile applications using a single codebase. Migrated from the TypeScript version, it leverages Python for superior developer experience, powerful fixtures with Pytest, and modern type validation with Pydantic.

✨ Key Highlights

FeatureDescription
🚀 Python FirstFully typed API (Mypy) for better IDE support and robustness.
🧩 Strategy PatternRuntime driver resolution between platforms.
📄 Hierarchical LocatorsCascading JSON inheritance model.
🛡️ Type-Safe ConfigEnvironment variables validated with Pydantic.

💻 Code Example (Python)

Web Test

import pytest
import allure

@allure.feature('Login')
def test_should_login_successfully(web_driver):
driver = web_driver
driver.navigate_to('https://the-internet.herokuapp.com/login')
driver.load_locators('login')

username = driver.find_element('username_field')
password = driver.find_element('password_field')
login_button = driver.find_element('login_button')

username.fill('tomsmith')
password.fill('SuperSecretPassword!')
login_button.click()

flash_message = driver.find_element('flash_message')
assert 'You logged into a secure area!' in flash_message.get_text()