Skip to main content

selenium-pagefactory-impl

GitHub license

A Selenium Page Factory implementation for Python, providing enhanced functionality for web automation.

Features

  • Simplified and intelligent page factory for Selenium projects.
  • Convenient methods for interacting with web elements.
  • Improved handling of StaleElementReferenceException.

Installation

Use Poetry to install the package and its dependencies:

poetry install

How to implement in the test

# Import the PageFactory class
from selenium_pagefactory.page_factory_impl import PageFactory

# Your page class using PageFactory
class YourPageClass:
    # Define locators
    locators = {
        'element_name': (By.XPATH, "//your/xpath"),
        # Add more locators as needed
    }

    # Initialize elements using PageFactory
    def __init__(self, driver):
        self.driver = driver
        PageFactory.initialize_elements(self, driver)

# Example usage
driver = webdriver.Chrome()
page_instance = YourPageClass(driver)
page_instance.element_name.click()

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Special thanks to the Selenium and pytest communities.

Metadata

Release files for selenium-pagefactory-impl 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for selenium-pagefactory-impl 0.1.0
File Size Uploaded
selenium_pagefactory_impl-0.1.0.tar.gz 2.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for selenium-pagefactory-impl 0.1.0
File Interpreter ABI Platform
selenium_pagefactory_impl-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.4 kB

Release files / selenium_pagefactory_impl-0.1.0.tar.gz

Download URL selenium_pagefactory_impl-0.1.0.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
40df4a58c85e363d2f169f056efa0efb06ff607b1fed77c21910fa6f42493b4d
BLAKE2b-256 checksum
How to use checksums
bf4c4354458ef0db56be23c4b868bbda4f0cdf08bb7eeb2b8d9492cf220ed70d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.0 Windows/11

Release files / selenium_pagefactory_impl-0.1.0-py3-none-any.whl

Download URL selenium_pagefactory_impl-0.1.0-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
950e8ec6d5022704862880112e72890541b17ae7baffb3d4e9dcc25013d3676f
BLAKE2b-256 checksum
How to use checksums
843814099d059ee6ae8bcb88b380db2738abf3c04bafe1288638984a928be9d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.0 Windows/11

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page