Robotframework-FlaUI Library
| License | |
| Python Builds (x86) | |
| Python Builds (x64) | |
| Tests | |
| Python | |
| Robotframework | |
| PyPi |
Introduction
Robotframework-FlaUI is a keyword based user interface automation testing library for Windows applications like Win32, WinForms, WPF or Store Apps. It's based on the FlaUI user interface automation library.
The library supports Microsoft UI Automation interfaces UIA2 and UIA3 (default). Elements are located by XPath. Mouse keywords also accept absolute screen coordinates or X/Y offsets from an element's clickable point. Keyboard keywords can send input globally when no XPath is given.
Installation
Install the latest stable release:
pip install --upgrade robotframework-flaui
Usage
*** Settings ***
Library FlaUILibrary uia=UIA3 screenshot_on_failure=True screenshot_mode=FILE screenshot_suffix=jpg timeout=1000
Library import arguments:
| Argument | Default | Description |
|---|---|---|
uia |
UIA3 |
Microsoft UI Automation interface: UIA2 or UIA3 |
screenshot_on_failure |
True |
Take a screenshot when a keyword fails |
screenshot_dir |
output | Screenshot directory relative to the Robot output directory |
timeout |
1000 |
Default element find timeout in milliseconds |
screenshot_mode |
FILE |
Persist screenshots as FILE or BASE64 |
screenshot_suffix |
jpg |
Screenshot file type when mode is FILE: png, jpg or jpeg |
Mouse examples:
Click ${XPATH}
Click x=100 y=200
Click ${XPATH} x=10 y=20
Keyboard examples:
Press Key t'Text' ${XPATH}
Press Key t'Text'
Press Keys ${KEYS}
A full keyword reference is available in the keyword documentation.
Dependencies and python support
The robot framework FlaUI is supposed to support the current Python 3 versions.
Required dependencies
See dependencies from Documentation
Runtime dependencies are listed in requirements.txt:
- Robot Framework 3.2.2 or newer
- Python.Net 3.0.0 or newer
- robotframework-pythonlibcore
- typing-extensions
Python.Net Wrapper Issues
Robotframework-Flaui 1.x
- With the release of Python.Net version 2.5.2, Python 3.9 support was implemented for the first time.
- However, no official support for Python 3.9 has been released yet.
- For more information see the issue #1389
- If there are problems installing the Python.Net library, please use Python 3.8 instead.
- This is only a potential problem by all robotframework-flaui 1.x versions which are implemented by Python.Net 2.5.2
Robotframework-Flaui 2.x
- Sometimes an AccessViolationException wil be occure on latest Python.Net Version v3.0.1
- For more information see the issue #1977
- A workaround is to set Python's memory allocation environment variable "PYTHONMALLOC=malloc"
Documentation
Keyword HTML and XML docs are generated by libdoc.py during the build blueprint stage and published from the documentation GitHub branch to GitHub Pages.
RFHUB2
RFHUB2 is an opensource project aimed to provide nice and easy way of collecting, browsing and sharing documentation of existing keywords written in RobotFramework and python. Built with Material-UI and FastAPI, served by Uvicorn.
Keyword XML files live on the documentation branch under docs/keywords/. Check out that branch and import them with RFHUB2-CLI:
rfhub2-cli .\docs\keywords\
rfhub2-cli .\docs\keywords\<VERSION>
GUI Inspector Tools
There are various tools around which help inspecting application that should be ui tested or automated.
Some of them are:
- FlaUI Inspect
- Alternatively FlaUInspectStable more stable version
- Microsoft Accessibility Insights For Windows
- VisualUIAVerify
- Inspect
- UISpy
Examples
Examples of use can be found in the atests folder.
Development
Preconditions
- Install Python, if not already installed.
- Python 3.8 or newer is supported (CI covers 3.8–3.14, x86 and x64).
Requirement files
| File | Purpose |
|---|---|
requirements.txt |
Runtime dependencies of the library |
requirements-dev.txt |
Local build, lint and test tools |
requirements-buildsystem.txt |
Builddrone |
requirements-artifact-upload.txt |
Twine, used by the pypi blueprint stage |
Dependency installation by Builddrone
Install Builddrone, then run stages from blueprint.json:
python -m pip install -r requirements-buildsystem.txt
python -m builddrone <stage>
Builddrone documentation: https://nepitwin.github.io/Builddrone/latest/
Test-Applications
Two test projects were used for the UI automation:
- FlaUI WPF Test App 'Standard application that contains all common UI elements'
- Notifier Test App 'Application which closes automatically after a time'
Testing locally TLDR
python -m venv .venv
.venv/Scripts/pip install -r requirements-dev.txt
cd ./atests
../.venv/Scripts/robot -v UIA:UIA3 -d ../result -P ../src -t "Element Should Be Offscreen" Element.robot
Building and testing with Builddrone
Local CI is defined in blueprint.json and executed by Builddrone:
python -m builddrone <stage>
Builddrone loads blueprint.json from the working directory, selects the named stage and runs its module steps in order. Relative paths are resolved from the directory that contains blueprint.json.
| Stage | Purpose |
|---|---|
build |
Create .build.venv, install requirements-dev.txt, build the package into dist/, generate keyword docs into keywords/ |
cleanup |
Remove generated folders and local virtual environments |
robocop |
Run Robot Framework lint checks via robocop_lint.py in .testing.venv |
pylint |
Run pylint for the Python sources in src |
test |
Run UIA2 and UIA3 acceptance tests, merge reports into result/ |
pypi |
Upload dist/*.whl and dist/*.tar.gz to PyPI (AppVeyor, git tags only) |
appveyor_upload_tests |
Upload JUnit results to AppVeyor |
appveyor_upload_failure_artifacts |
Zip result/ and upload it as an AppVeyor artifact on failure |
The build stage writes:
- Wheel and source distribution under
dist/ - Keyword documentation
keywords/keywords.htmlandkeywords/keywords.xml(generated bylibdoc.py)
The test stage runs atests twice (UIA2 and UIA3), merges the Robot outputs with rebot into result/, copies screenshots and converts the merged report with parsly.py.
robocop, pylint and test share .testing.venv. build uses .build.venv. pypi uses .upload.venv.
Example full local CI run:
python -m pip install -r requirements-buildsystem.txt
python -m builddrone build
python -m builddrone robocop
python -m builddrone pylint
python -m builddrone test
AppVeyor (appveyor.yml) runs the same four stages on every branch except documentation. The pypi stage runs only when the build is triggered by a git tag.
Contributing
Code changes are welcome via pull request. Release tagging, PyPI upload and keyword documentation publishing are not part of this workflow.
- add or update keywords in folders
src/FlaUILibrary/flaui/modulesrc/FlaUILibrary/keywords
- add or update tests in folder
atests - update
CHANGELOG.mdunder[Unreleased] - open a pull request against
main
Acknowledgements
FlaUI
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 robotframework_flaui-5.1.1.tar.gz.
File metadata
- Download URL: robotframework_flaui-5.1.1.tar.gz
- Upload date:
- Size: 324.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
026f3ddf95b46d22ac2433f62db523a979e7ffd449682e7dd3d895095c5bacfc
|
|
| MD5 |
025af74de5bda3e5d8675604bc698aa1
|
|
| BLAKE2b-256 |
90f98d65444537e86e8ab3b0932eb6f77c511d954f0128040642ad41daa502db
|
File details
Details for the file robotframework_flaui-5.1.1-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: robotframework_flaui-5.1.1-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 360.8 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e2d4f91228380a34a6a2eabeda4f0aaf47ada081ac5b1e906aae2231ee5b850
|
|
| MD5 |
ca52d6c8a1d793e35d956d4f727e8504
|
|
| BLAKE2b-256 |
9da5c4accaec4f35de605b7ea911705c96f9a9f21a420fd807bbad5c6b432acc
|
File details
Details for the file robotframework_flaui-5.1.1-cp314-cp314-win32.whl.
File metadata
- Download URL: robotframework_flaui-5.1.1-cp314-cp314-win32.whl
- Upload date:
- Size: 360.8 kB
- Tags: CPython 3.14, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddaa69ecbff6dcc6794126eec6241964a3d281a2c13d82fceffebbf1d8bfd783
|
|
| MD5 |
c0020d58611377a326872743f710f9f9
|
|
| BLAKE2b-256 |
f0abdd177ff06e4f5d7ea7efbaef03fd406155ee0706e5a1c7ff358b5ebc2241
|
File details
Details for the file robotframework_flaui-5.1.1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: robotframework_flaui-5.1.1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 350.6 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
678e2a027946fa2e37c5f493b7db36a24cc2e4e183339edcbf50b4c225c0129f
|
|
| MD5 |
653e8aefcccd3ef2abd275f9bf0435c9
|
|
| BLAKE2b-256 |
5ae7869e2eb1a70807a12801af5b812ab254c2b89d802c2394135e0c42c4cf81
|
File details
Details for the file robotframework_flaui-5.1.1-cp313-cp313-win32.whl.
File metadata
- Download URL: robotframework_flaui-5.1.1-cp313-cp313-win32.whl
- Upload date:
- Size: 350.6 kB
- Tags: CPython 3.13, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21bcccab54301bb25d8f5b546614349c35456f089b71b32ce28c5eabda5dfb21
|
|
| MD5 |
3a466ffebd1bc33bde5e54c2278ef6fa
|
|
| BLAKE2b-256 |
3297ae92ed711d719aafee1245f31f63cdc794f655270443828f0ae8c4bfcaff
|
File details
Details for the file robotframework_flaui-5.1.1-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: robotframework_flaui-5.1.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 350.6 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ad878d3cee11f36ec356623bbd798322852382bd5847c87a8aa9f0f146c2299
|
|
| MD5 |
e639f87d48d77a5c9d92288f38ba19e9
|
|
| BLAKE2b-256 |
a357b9124dc1d5a047874dc93c034a4c17a4f736d182685f16ecc1b5e652ac3b
|
File details
Details for the file robotframework_flaui-5.1.1-cp312-cp312-win32.whl.
File metadata
- Download URL: robotframework_flaui-5.1.1-cp312-cp312-win32.whl
- Upload date:
- Size: 350.6 kB
- Tags: CPython 3.12, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89779b5dd9c2b93d139b310fe78ffc2f42423be043bcb4f420086e3a4b843ce6
|
|
| MD5 |
65a001689af821c926e5c984ad7e475b
|
|
| BLAKE2b-256 |
d44201e755b854dc52cb45a0ba8e6ed8af6757d5784bf97876005ca7cbf6c839
|
File details
Details for the file robotframework_flaui-5.1.1-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: robotframework_flaui-5.1.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 350.6 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
988c6a08536aa6ff67d25736f76920a6cb770bc78ec102702795548e0b5159d3
|
|
| MD5 |
516d68ba4881f52c77f0448a6a8dce22
|
|
| BLAKE2b-256 |
9ac8c3d1bdba35ce324e69d1078cfbbff42a33d33026eb11bd048b966b160f69
|
File details
Details for the file robotframework_flaui-5.1.1-cp311-cp311-win32.whl.
File metadata
- Download URL: robotframework_flaui-5.1.1-cp311-cp311-win32.whl
- Upload date:
- Size: 350.6 kB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1b20f571e77bf86a123d3872b4c6bb4934d8530a766e7e8ddfc4552822e8108
|
|
| MD5 |
f8bcfed1eaeca938ec68031ddb171443
|
|
| BLAKE2b-256 |
7404ef2eae08709228c4f0688976b43a73f2d3df5aa6c9354073f6462c82c6e5
|
File details
Details for the file robotframework_flaui-5.1.1-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: robotframework_flaui-5.1.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 350.6 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8be3065742891c717cafecffc10a721bbb9ed0126d3a5a88be6253ac2a308af
|
|
| MD5 |
837a8bceb7061044db524e781aa4e783
|
|
| BLAKE2b-256 |
410d2258a7da330d451fb986a7338864e98a03fee4d806fd4dfd515597e30231
|
File details
Details for the file robotframework_flaui-5.1.1-cp310-cp310-win32.whl.
File metadata
- Download URL: robotframework_flaui-5.1.1-cp310-cp310-win32.whl
- Upload date:
- Size: 350.6 kB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dedf2606d33c326c1f2b15cdd08202afc0c8c0515f8bfff35c47b050e672e96
|
|
| MD5 |
1a9f5e8307528131f9ec608f6aed6e84
|
|
| BLAKE2b-256 |
dc9db2c840bf5becbb2ae3f646d4bf8604a193eff84d7c993e701a23858955f7
|
File details
Details for the file robotframework_flaui-5.1.1-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: robotframework_flaui-5.1.1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 350.6 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46a10e37659aafa221f190da433058d24fa62e0621701d92d12f64dcd284f3b0
|
|
| MD5 |
3b1b15b383c50737f1181a398aa34eee
|
|
| BLAKE2b-256 |
82b669625796f431424a61d581c248d248019c1b6bfc84c727cf4f6f26787a61
|
File details
Details for the file robotframework_flaui-5.1.1-cp39-cp39-win32.whl.
File metadata
- Download URL: robotframework_flaui-5.1.1-cp39-cp39-win32.whl
- Upload date:
- Size: 350.6 kB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b65546bab335652b04accc118a442c4c0a544dbaf93862ca317e864312fbe2e
|
|
| MD5 |
c8f53103774e6465547d33283a0db8f1
|
|
| BLAKE2b-256 |
f0ddfb6a140fcfe7dfeb1c2e5b9295f6038469b67573ea7a7981a41722ddf7d9
|
File details
Details for the file robotframework_flaui-5.1.1-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: robotframework_flaui-5.1.1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 350.5 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
941df806189fb4a26f2841811868214d89cc0f1d29133f2229dc8827f6c11c90
|
|
| MD5 |
4e68a19a46b4b85f13a8116d157e95f8
|
|
| BLAKE2b-256 |
d09842f30c9fb3f17764c481e5d23028912032ebbd69530f428ceda893491137
|
File details
Details for the file robotframework_flaui-5.1.1-cp38-cp38-win32.whl.
File metadata
- Download URL: robotframework_flaui-5.1.1-cp38-cp38-win32.whl
- Upload date:
- Size: 350.5 kB
- Tags: CPython 3.8, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
168cab3c8f0399b51e9138dcb208902128f1a3822a32c2998db57c7c063d0990
|
|
| MD5 |
3395af0dc5edffaaa40bf63fc34bf87c
|
|
| BLAKE2b-256 |
a989dd5a8a5b2e1e6689ed9d0d5c311c3ae935d2b7fe656ce0710f8409b1bfce
|