Automation library for Ignition Perspective based on Inductive Automation's ignition-automation-tools.
Project description
dg-ignition-selenium
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-managerfor 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
-
Create or edit the
~/.pypircfile in your home directory. -
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>
-
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.3).
Local Build Steps
To build the package locally for testing or manual uploads:
-
Clone the Repository:
git clone https://github.com/design-group/dg-ignition-selenium.git cd dg-ignition-selenium
-
Initialize Submodules:
The package depends on the
ignition-automation-toolssubmodule:git submodule update --init --recursive
-
Install Build Dependencies:
pip install build twine
-
Create
__init__.pyFiles:Run the script to generate
__init__.pyfiles for the submodule:chmod +x scripts/create-init-files.sh ./scripts/create-init-files.sh
-
Build the Package:
python -m build
This creates
dist/dg_ignition_selenium-<version>-py3-none-any.whlanddist/dg_ignition_selenium-<version>.tar.gz. -
Verify the Build:
twine check dist/*
-
Install Locally (Optional):
pip install dist/dg_ignition_selenium-<version>-py3-none-any.whl
-
Upload to TestPyPI (Optional):
If you’ve set up
~/.pypircor 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:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/your-feature). - Commit changes (
git commit -m "Add your feature"). - Push to the branch (
git push origin feature/your-feature). - 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dg_ignition_selenium-0.1.3.tar.gz.
File metadata
- Download URL: dg_ignition_selenium-0.1.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
836ed0f421b031e67529e97485fbc62c98947ef2d237fb4fb02bf570a10ef3b0
|
|
| MD5 |
061699910ddc75c6cae278e0a17ddf04
|
|
| BLAKE2b-256 |
9763573ad09fc02661def5e8530c4f32bf860625e873d1635cc5a5cde649964e
|
File details
Details for the file dg_ignition_selenium-0.1.3-py3-none-any.whl.
File metadata
- Download URL: dg_ignition_selenium-0.1.3-py3-none-any.whl
- Upload date:
- Size: 310.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
879f9da67a7407eb717ceb50e7e90911c3acc8fa8597edc3b5594345c9cc14c1
|
|
| MD5 |
255046d21f5c9ebc1be82fdc9da98bbc
|
|
| BLAKE2b-256 |
ba9b1df37ab4067e1cf9996a03fcd02226b542f62b6e6b370a90d730c8080ee0
|