<p align="left">
<img src="https://upload.wikimedia.org/wikipedia/commons/e/e4/Robot-framework-logo.png" alt="RB Logo" width="200">
<img src="https://upload.wikimedia.org/wikipedia/commons/7/77/Qgis-icon-3.0.png?20180304175057" alt="QGIS 3.0 Logo" width="120">
</p>
---
# QGISLibrary
A **QGIS** library for **Robot Framework** providing reusable keywords for QGIS UI Automation and QGIS UI Testing.
---
## Installation
Install via pip:
```bash
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 clear HTML report of task/test execution
- Capture screenshots and logs for test validation
- Integrates with Robot Framework for robust automated tests
- Supports Windows (via PyWinAuto) and cross-platform (via PyAutoGUI)
---
## Example of Robot Framework file
```robot
# 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 3.40.7-Bratislava
Library QGISLibrary
Library Screenshot
*** Variables ***
${QGIS_FILEPATH} C:\\Program Files\\QGIS 3.40.7\\bin\\qgis-ltr-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 Parent ${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
```bash
robot qgis_sample.robot
```
- For help run via terminal
```bash
robot --help
```
- Open HTML Reports: **report.html** or **log.html**
---
## QGIS UI Locators
- Use **Inspect.exe** or **UISpy.exe** (located on: [QGISLibrary on GitLab](https://gitlab.com/michpil/qgis_library/-/tree/main)) to detect UI locators
---
## Robot Framework Editor
- Use **RIDE** to edit `.robot` files:
- Run command via terminal
```bash
pip install robotframework-ride
ride
```
---
## Links
[Robot Framework Documentation](https://robotframework.org/robotframework/#user-guide)
[QGISLibrary Documentation](https://gitlab.com/michpil/qgis_library/-/blob/main/QGISLibrary.html)
Raw data
{
"_id": null,
"home_page": null,
"name": "QGISLibrary",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "qgis, robotframework, ui automation, ui testing, pywinauto, pyautogui",
"author": null,
"author_email": "Michal Pilarski <michpil@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/c7/ee/214b9ccba091738418e39eeca72debf49586e8914afa563f4dd27c3ddc51/qgislibrary-1.7.8.tar.gz",
"platform": null,
"description": "<p align=\"left\">\r\n <img src=\"https://upload.wikimedia.org/wikipedia/commons/e/e4/Robot-framework-logo.png\" alt=\"RB Logo\" width=\"200\">\r\n <img src=\"https://upload.wikimedia.org/wikipedia/commons/7/77/Qgis-icon-3.0.png?20180304175057\" alt=\"QGIS 3.0 Logo\" width=\"120\">\r\n</p>\r\n\r\n---\r\n\r\n\r\n# QGISLibrary\r\n\r\nA **QGIS** library for **Robot Framework** providing reusable keywords for QGIS UI Automation and QGIS UI Testing.\r\n\r\n---\r\n\r\n## Installation\r\n\r\nInstall via pip:\r\n\r\n```bash\r\npip install QGISLibrary\r\n```\r\n\r\n\r\n---\r\n\r\n\r\n## Features\r\n\r\n- Automate QGIS UI actions using section *** Tasks *** in robot file\r\n- Test QGIS UI behaviours using section *** Test Cases *** in robot file\r\n- Generate clear HTML report of task/test execution\r\n- Capture screenshots and logs for test validation \r\n- Integrates with Robot Framework for robust automated tests \r\n- Supports Windows (via PyWinAuto) and cross-platform (via PyAutoGUI) \r\n\r\n\r\n---\r\n\r\n\r\n## Example of Robot Framework file\r\n```robot\r\n# File: qgis_sample.robot\r\n*** Settings ***\r\nDocumentation This is an example QGIS Robot Framework file\r\nSuite Setup Set Metadata From Variables\r\nSuite Teardown Log End of Suite\r\nMetadata Author Michal Pilarski\r\nMetadata Version 1.0.0\r\nMetadata Environment TEST\r\nMetadata QGIS Version 3.40.7-Bratislava\r\nLibrary QGISLibrary\r\nLibrary Screenshot\r\n\r\n*** Variables ***\r\n${QGIS_FILEPATH} C:\\\\Program Files\\\\QGIS 3.40.7\\\\bin\\\\qgis-ltr-bin.exe\r\n${QGIS_PROFILE} default\r\n\r\n*** Tasks ***\r\nQGIS Init Task\r\n [Documentation] Sample of QGIS Init Task\r\n [Tags] dev qgis\r\n [Setup] Log Start Task\r\n [Teardown] Log End Task\r\n Start Qgis ${QGIS_FILEPATH} ${QGIS_PROFILE}\r\n# Connect Qgis ${QGIS_FILEPATH}\r\n ${MAIN_WINDOW} Main Window\r\n ${OPEN_PROJECT_BUTTON} Get Locator By Parent ${MAIN_WINDOW} title=Otw\u00f3rz\u2026 control_type=Button\r\n Mouse Left Click Locator ${OPEN_PROJECT_BUTTON} 1\r\n Take Screenshot qgis_screenshot.jpg\r\n# Kill Qgis\r\n\r\n*** Keywords ***\r\nSet Metadata From Variables\r\n [Documentation] Set Suite Metadata\r\n Set Suite Metadata QGIS FILEPATH ${QGIS_FILEPATH}\r\n Set Suite Metadata QGIS PROFILE ${QGIS_PROFILE}\r\n```\r\n\r\n\r\n---\r\n\r\n\r\n## Usage\r\n- Run command via terminal\r\n```bash\r\nrobot qgis_sample.robot\r\n```\r\n- For help run via terminal\r\n```bash\r\nrobot --help\r\n```\r\n- Open HTML Reports: **report.html** or **log.html**\r\n\r\n\r\n---\r\n\r\n\r\n## QGIS UI Locators\r\n- Use **Inspect.exe** or **UISpy.exe** (located on: [QGISLibrary on GitLab](https://gitlab.com/michpil/qgis_library/-/tree/main)) to detect UI locators\r\n\r\n\r\n---\r\n\r\n\r\n## Robot Framework Editor\r\n- Use **RIDE** to edit `.robot` files:\r\n- Run command via terminal\r\n```bash\r\npip install robotframework-ride\r\nride\r\n```\r\n\r\n\r\n---\r\n\r\n\r\n## Links\r\n[Robot Framework Documentation](https://robotframework.org/robotframework/#user-guide)\r\n\r\n[QGISLibrary Documentation](https://gitlab.com/michpil/qgis_library/-/blob/main/QGISLibrary.html)\r\n",
"bugtrack_url": null,
"license": "MIT - free and open-source licence",
"summary": "A QGIS Robot Framework for QGIS UI Automation and QGIS UI Testing",
"version": "1.7.8",
"project_urls": {
"Homepage": "https://gitlab.com/michpil/qgis_library"
},
"split_keywords": [
"qgis",
" robotframework",
" ui automation",
" ui testing",
" pywinauto",
" pyautogui"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2050fb140fcb5171572e106df9a73e80cf250b2b9a5c7af66fb1f100b143c2b1",
"md5": "c91527080c4b4d73c163930963b3fcde",
"sha256": "06dace18075718778a762314d3c51e2451e506f1a1693c408a87e10b2b7f3aae"
},
"downloads": -1,
"filename": "qgislibrary-1.7.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c91527080c4b4d73c163930963b3fcde",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 9787,
"upload_time": "2025-10-30T20:50:47",
"upload_time_iso_8601": "2025-10-30T20:50:47.207469Z",
"url": "https://files.pythonhosted.org/packages/20/50/fb140fcb5171572e106df9a73e80cf250b2b9a5c7af66fb1f100b143c2b1/qgislibrary-1.7.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c7ee214b9ccba091738418e39eeca72debf49586e8914afa563f4dd27c3ddc51",
"md5": "75d3266906d451998e93e77cfcd7a9ef",
"sha256": "8df5c8e811d9610f861fa24c64a9c3b32209eb8e031289bfe2daf1e671f8bbca"
},
"downloads": -1,
"filename": "qgislibrary-1.7.8.tar.gz",
"has_sig": false,
"md5_digest": "75d3266906d451998e93e77cfcd7a9ef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 10938,
"upload_time": "2025-10-30T20:50:48",
"upload_time_iso_8601": "2025-10-30T20:50:48.542045Z",
"url": "https://files.pythonhosted.org/packages/c7/ee/214b9ccba091738418e39eeca72debf49586e8914afa563f4dd27c3ddc51/qgislibrary-1.7.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-30 20:50:48",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "michpil",
"gitlab_project": "qgis_library",
"lcname": "qgislibrary"
}