QGISLibrary
A Robot Framework library that provides reusable keywords for QGIS UI Automation and Testing
Installation
Install via pip:
pip install QGISLibrary
Features
- Automate QGIS UI actions using section *** Tasks *** in robot file
- Test QGIS UI behaviours using section *** Test Cases *** in robot file
- Generate HTML report of task/test execution
- Capture screenshots and logs
- Supported OS: Windows (PyWinAuto, PyAutoGUI), Linux and MacOS not yet supported
Example of Robot Framework file
qgis_sample.robot
*** Settings ***
Documentation This is an example QGIS Robot Framework file
Suite Setup Set Metadata From Variables
Suite Teardown Log End of Suite
Metadata Author Michal Pilarski
Metadata Version 1.0.0
Metadata Environment TEST
Metadata QGIS Version 4.0.3-Norrköping
Library QGISLibrary
Library Screenshot
*** Variables ***
${QGIS_FILEPATH} C:\\Program Files\\QGIS 4.0.3\\bin\\qgis-bin.exe
${QGIS_PROFILE} default
*** Tasks ***
QGIS Init Task
[Documentation] Sample of QGIS Init Task
[Tags] dev qgis
[Setup] Log Start Task
[Teardown] Log End Task
Start Qgis ${QGIS_FILEPATH} ${QGIS_PROFILE}
# Connect Qgis ${QGIS_FILEPATH}
${MAIN_WINDOW} Main Window
${OPEN_PROJECT_BUTTON} Get Locator By Args ${MAIN_WINDOW} title=Otwórz… control_type=Button
Mouse Left Click Locator ${OPEN_PROJECT_BUTTON} 1
Take Screenshot qgis_screenshot.jpg
# Kill Qgis
*** Keywords ***
Set Metadata From Variables
[Documentation] Set Suite Metadata
Set Suite Metadata QGIS FILEPATH ${QGIS_FILEPATH}
Set Suite Metadata QGIS PROFILE ${QGIS_PROFILE}
Usage
- Run command via terminal
robot qgis_sample.robot
- For help run via terminal
robot --help
- Open HTML Reports: report.html or log.html
QGIS UI Locators
- Use Inspect.exe or UISpy.exe (located on: QGISLibrary on GitLab) to detect UI locators
Robot Framework Editor
- Use RIDE to edit
.robotfiles: - Run command via terminal
pip install robotframework-ride
ride
Links
Metadata
Release files for QGISLibrary 1.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| qgislibrary-1.8.1.tar.gz | 11.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qgislibrary-1.8.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.1 kB
Release files / qgislibrary-1.8.1.tar.gz
| Download URL | qgislibrary-1.8.1.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bded37c3f3f5f2a5454a82e68e296db858e06f9268ff0e6abafce34195c5c2ff
|
|
BLAKE2b-256 checksum How to use checksums |
8b1cbce2798f93b95f32d7aaeb3ba80096442da3a2c0d0de71c059f7a753d796
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / qgislibrary-1.8.1-py3-none-any.whl
| Download URL | qgislibrary-1.8.1-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04652efdc1f299481c9fa5cbe916fcdcdad1cbcc7bcb56643894f6434fd7fa4d
|
|
BLAKE2b-256 checksum How to use checksums |
f3ad253abbec39552b3a522b0e592a1c01c955b65fcd0106f02270fa610b4eac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for QGISLibrary 1.8.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.