Skip to main content

Automation library for Ignition Perspective based on Inductive Automation's ignition-automation-tools.

Project description

dg-ignition-selenium

PyPI version

Automation library for Ignition Perspective, built on Inductive Automation's ignition-automation-tools. This package provides tools for automated testing of Perspective Sessions, including interactions with components, pages, and specialized helpers for Selenium integration.

Note: This package is not supported by Inductive Automation’s support plan. For questions, refer to the Inductive Automation forums.

Features

  • Near 1:1 collection of Perspective components for automated testing (excluding pure SVG components and certain third-party libraries).
  • Helpers for Selenium interactions, standardized assertions, and Perspective page handling.
  • Support for navigating Perspective as a Single Page Application, avoiding direct HTTP requests.

Requirements

  • Python >= 3.8
  • selenium >= 4.0.0
  • WebDriver (e.g., ChromeDriver, managed via webdriver-manager for convenience)

Installation

Install from PyPI

Once published, install the package using pip:

pip install dg-ignition-selenium

Setting Up Local PyPI Authentication

To authenticate with PyPI for private or test uploads (e.g., to TestPyPI), configure your PyPI credentials locally. Follow these steps:

Option 1: Using ~/.pypirc

  1. Create or edit the ~/.pypirc file in your home directory.

  2. Add the following configuration, replacing <your-pypi-api-token> with your PyPI API token (obtained from PyPI Account Settings):

    [distutils]
    index-servers =
        pypi
        testpypi
    
    [pypi]
    username = __token__
    password = <your-pypi-api-token>
    
    [testpypi]
    repository = https://test.pypi.org/legacy/
    username = __token__
    password = <your-testpypi-api-token>
    
  3. Secure the file permissions (on Unix-like systems):

    chmod 600 ~/.pypirc
    

Option 2: Using Environment Variables

Alternatively, set environment variables for temporary or CI/CD use:

export TWINE_USERNAME=__token__
export TWINE_PASSWORD=<your-pypi-api-token>

For TestPyPI, also set the repository URL:

export TWINE_REPOSITORY_URL=https://test.pypi.org/legacy/

Verify Installation

After installation, verify the package:

pip show dg-ignition-selenium

Test importing:

python -c "import ignition_automation_tools; print(ignition_automation_tools.__version__)"

This should output the installed version (e.g., 0.1.2).

Local Build Steps

To build the package locally for testing or manual uploads:

  1. Clone the Repository:

    git clone https://github.com/design-group/dg-ignition-selenium.git
    cd dg-ignition-selenium
    
  2. Initialize Submodules:

    The package depends on the ignition-automation-tools submodule:

    git submodule update --init --recursive
    
  3. Install Build Dependencies:

    pip install build twine
    
  4. Create __init__.py Files:

    Run the script to generate __init__.py files for the submodule:

    chmod +x scripts/create-init-files.sh
    ./scripts/create-init-files.sh
    
  5. Build the Package:

    python -m build
    

    This creates dist/dg_ignition_selenium-<version>-py3-none-any.whl and dist/dg_ignition_selenium-<version>.tar.gz.

  6. Verify the Build:

    twine check dist/*
    
  7. Install Locally (Optional):

    pip install dist/dg_ignition_selenium-<version>-py3-none-any.whl
    
  8. Upload to TestPyPI (Optional):

    If you’ve set up ~/.pypirc or environment variables:

    twine upload --repository testpypi dist/*
    

    Install from TestPyPI to test:

    pip install --index-url https://test.pypi.org/simple/ dg-ignition-selenium
    

Usage

from ignition_automation_tools.Components.PerspectiveComponents.Displays.Table import Table
from ignition_automation_tools import PerspectivePageObject

# Example: Initialize a Perspective page
page = PerspectivePageObject(driver=your_selenium_driver, path="/project-name/path/to/page")
page.wait_on_page_load()

# Interact with a Table component
table = Table(page, "table_component_id")
table.set_value("new_value")

For detailed usage, refer to the ignition-automation-tools documentation.

Contributing

Contributions are welcome! Please:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/your-feature).
  3. Commit changes (git commit -m "Add your feature").
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

Report issues at GitHub Issues.

License

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

Contact

For questions, contact keith.gamble@bwdesigngroup.com.

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

dg_ignition_selenium-0.1.2.tar.gz (231.7 kB view details)

Uploaded Source

Built Distribution

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

dg_ignition_selenium-0.1.2-py3-none-any.whl (310.8 kB view details)

Uploaded Python 3

File details

Details for the file dg_ignition_selenium-0.1.2.tar.gz.

File metadata

  • Download URL: dg_ignition_selenium-0.1.2.tar.gz
  • Upload date:
  • Size: 231.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for dg_ignition_selenium-0.1.2.tar.gz
Algorithm Hash digest
SHA256 25e5f8f0f874391ae967605663365d7b2826bd3acaa52e276e132d14d999eb4f
MD5 dd244c44c4b77177581ca1e2bf484cb6
BLAKE2b-256 6c56daef9b7613a197277b379c0da9892d247fd86b453e89b2b2a694874198cd

See more details on using hashes here.

File details

Details for the file dg_ignition_selenium-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for dg_ignition_selenium-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 549292388fdae333cdec5880d7df3399f94f9fafaa28d7a837471c0272dbcf00
MD5 19bc4dc64c773c7b2ee17a50aadaed96
BLAKE2b-256 7c36dc6ca1595005dca23f87a6b6a1e679f0ce89d4fd2e74728988e21467a58b

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