Skip to main content

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:

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.html and keywords/keywords.xml (generated by libdoc.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/module
    • src/FlaUILibrary/keywords
  • add or update tests in folder atests
  • update CHANGELOG.md under [Unreleased]
  • open a pull request against main

Acknowledgements

FlaUI

  • Thanks to @Roemer for the passion to create and maintain the FlaUI project.
  • Thanks to FlaUI developers and maintainers for this project.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework_flaui-5.2.1.tar.gz (326.9 kB view details)

Uploaded Source

Built Distributions

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

robotframework_flaui-5.2.1-cp314-cp314-win_amd64.whl (364.0 kB view details)

Uploaded CPython 3.14Windows x86-64

robotframework_flaui-5.2.1-cp314-cp314-win32.whl (364.0 kB view details)

Uploaded CPython 3.14Windows x86

robotframework_flaui-5.2.1-cp313-cp313-win_amd64.whl (353.8 kB view details)

Uploaded CPython 3.13Windows x86-64

robotframework_flaui-5.2.1-cp313-cp313-win32.whl (353.8 kB view details)

Uploaded CPython 3.13Windows x86

robotframework_flaui-5.2.1-cp312-cp312-win_amd64.whl (353.8 kB view details)

Uploaded CPython 3.12Windows x86-64

robotframework_flaui-5.2.1-cp312-cp312-win32.whl (353.8 kB view details)

Uploaded CPython 3.12Windows x86

robotframework_flaui-5.2.1-cp311-cp311-win_amd64.whl (353.8 kB view details)

Uploaded CPython 3.11Windows x86-64

robotframework_flaui-5.2.1-cp311-cp311-win32.whl (353.8 kB view details)

Uploaded CPython 3.11Windows x86

robotframework_flaui-5.2.1-cp310-cp310-win_amd64.whl (353.8 kB view details)

Uploaded CPython 3.10Windows x86-64

robotframework_flaui-5.2.1-cp310-cp310-win32.whl (353.8 kB view details)

Uploaded CPython 3.10Windows x86

robotframework_flaui-5.2.1-cp39-cp39-win_amd64.whl (353.8 kB view details)

Uploaded CPython 3.9Windows x86-64

robotframework_flaui-5.2.1-cp39-cp39-win32.whl (353.8 kB view details)

Uploaded CPython 3.9Windows x86

robotframework_flaui-5.2.1-cp38-cp38-win_amd64.whl (353.8 kB view details)

Uploaded CPython 3.8Windows x86-64

robotframework_flaui-5.2.1-cp38-cp38-win32.whl (353.8 kB view details)

Uploaded CPython 3.8Windows x86

File details

Details for the file robotframework_flaui-5.2.1.tar.gz.

File metadata

  • Download URL: robotframework_flaui-5.2.1.tar.gz
  • Upload date:
  • Size: 326.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for robotframework_flaui-5.2.1.tar.gz
Algorithm Hash digest
SHA256 41f96335cab06e69e63fef466c22f42e1a66990493b6996d1d93b3fa6e80514b
MD5 d5f0af8ed2cdd565c66cd61db66b1d35
BLAKE2b-256 a9ce9a22eb8e80bb9da422b45e1facc3b3cd15a9e5651a845a6895df46860fb6

See more details on using hashes here.

File details

Details for the file robotframework_flaui-5.2.1-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for robotframework_flaui-5.2.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 62fa4b103aed2c3f277801a34a857b1adcddde5bed0ba52e5a9b5be2773f9b10
MD5 2214225cdbe6a7b418083249f0c3d0d6
BLAKE2b-256 5e5088ee7d7d4a31c10b7c0be2899f415e3aa25c3134b48425bb7a4275df3642

See more details on using hashes here.

File details

Details for the file robotframework_flaui-5.2.1-cp314-cp314-win32.whl.

File metadata

File hashes

Hashes for robotframework_flaui-5.2.1-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 73ed5973e1db853299dcb08fa76e0bd5e798cedd4a65df57887b1b28553f3727
MD5 c9a9b577bf31125db4973f3948e77203
BLAKE2b-256 540fdffe1fd597ab44788863874165391939da68787e52fcaf6943509f76e2a4

See more details on using hashes here.

File details

Details for the file robotframework_flaui-5.2.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for robotframework_flaui-5.2.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6905fe94cc779657ca53e0e1ade791f547341b498bc589f614fcc490bc0bc629
MD5 ed340349b6bccdaf2f1be3190d36ffe0
BLAKE2b-256 956fc8224165db6034d678c9a2cf55da6eea117fb83ccfcffb83c2241b252854

See more details on using hashes here.

File details

Details for the file robotframework_flaui-5.2.1-cp313-cp313-win32.whl.

File metadata

File hashes

Hashes for robotframework_flaui-5.2.1-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 58df9aae8ef920ef787241723f548f7f13bf4d2be066f28d5e27e16d9ba33eb9
MD5 519b2b91292814f02386fe47560b7fc2
BLAKE2b-256 9de7fb82b5d0d134199db3d3aaf69c9c3748688eb726e3ce1ea2009ae4ccfbae

See more details on using hashes here.

File details

Details for the file robotframework_flaui-5.2.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for robotframework_flaui-5.2.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1b3ed3b6b71231c3223b8acfda35250bd2dcf884d0ee8ab081a39bad706d4307
MD5 510ee18ca81b594505c9465ac716cde1
BLAKE2b-256 d8b5049fe305e4f57a99e249a47dc9c0f37af5783f99d5c86e5930509aae4827

See more details on using hashes here.

File details

Details for the file robotframework_flaui-5.2.1-cp312-cp312-win32.whl.

File metadata

File hashes

Hashes for robotframework_flaui-5.2.1-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 b126506e8ca35050d442f05cb796d9a0744ec82aee7d1f17b549b96ef04c7a73
MD5 9a9c73dc02d601515927867ec42fb4bf
BLAKE2b-256 5de68040042364131dcb6edaac3b1a021d1f84e75d77b563a396108a68a8aef6

See more details on using hashes here.

File details

Details for the file robotframework_flaui-5.2.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for robotframework_flaui-5.2.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 acd576b9d625631b3422274d6c67f5315baa55d41498c3846fe1ab332fc2fa49
MD5 c6a63e7133f1b848ba3eb728a170c328
BLAKE2b-256 fd4901194e1edc6d03e8a6ef67e646b4ef8564ed4eb510562aab66719538d1cd

See more details on using hashes here.

File details

Details for the file robotframework_flaui-5.2.1-cp311-cp311-win32.whl.

File metadata

File hashes

Hashes for robotframework_flaui-5.2.1-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 e0aebef48c9e89c3b2d2163d19a711594e4035423dffd39f1c20a84131d53966
MD5 d6877ce5817845751c201dd2cfe4ad8b
BLAKE2b-256 2678ba8ba8e95d2d8c61816be5e6224b5c25dcdd2e8db53a713232996fb89061

See more details on using hashes here.

File details

Details for the file robotframework_flaui-5.2.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for robotframework_flaui-5.2.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fca9955932398f4c2550540bbba61b0453657a2fdb5bbf3f3e4cf73c95c07c76
MD5 02f5637c8778b64279cd8fdd0dbfd5fa
BLAKE2b-256 297057293b339b925bc0c979f79373b710d028696d31140860f560520a29ca42

See more details on using hashes here.

File details

Details for the file robotframework_flaui-5.2.1-cp310-cp310-win32.whl.

File metadata

File hashes

Hashes for robotframework_flaui-5.2.1-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 b7c7ca621a60474cc5c29f1ac659ac8ada9af5679c75f8932d38dbf7a69fcf95
MD5 1e068dc175a754b831c9024b87e79a05
BLAKE2b-256 c86c42a294df90b45229166a106ce73e49e6e4ce8ba54d0bf2fa5b9612ce8dc7

See more details on using hashes here.

File details

Details for the file robotframework_flaui-5.2.1-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for robotframework_flaui-5.2.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f263b0ab97c2b212d88a1e8fe4dd63e5c6e97d4dee016c4448e3c860e1d403dd
MD5 6ecd9586c5ea79af50118b68bebc9e81
BLAKE2b-256 25f48b6db965f4a35e1355fadd95a43e1b16589763a456e1fefb2d5d01d12322

See more details on using hashes here.

File details

Details for the file robotframework_flaui-5.2.1-cp39-cp39-win32.whl.

File metadata

File hashes

Hashes for robotframework_flaui-5.2.1-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 b19f126843b8a374b21fdfe29bbc5e072476cfdf073ff4daeae80ead8df83e80
MD5 a479762d39050a58c49e7865fb8eb747
BLAKE2b-256 a448eb2e0a19ca27282d74f6e1ecd3196a32296e2427a46fb878b537650cee08

See more details on using hashes here.

File details

Details for the file robotframework_flaui-5.2.1-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for robotframework_flaui-5.2.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 5a717c25f3624bbd715eb8a0406b1bf04f900ea59dde9bef6ed841e787754078
MD5 ee94391955b222d6089fa77f49daa206
BLAKE2b-256 1d35b4b4abef9185f799361b2f9be71eb7d5e98c7ef3eec674176066b59f9001

See more details on using hashes here.

File details

Details for the file robotframework_flaui-5.2.1-cp38-cp38-win32.whl.

File metadata

File hashes

Hashes for robotframework_flaui-5.2.1-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 8856ec9829f7b0b60df43eeaba60560794dd18af1ca22c3edcbc733e2c7bbaf0
MD5 40daff18306203b0c83b5f07b9951b65
BLAKE2b-256 c626597d1455aeadf1211e4341ce8421242022abaa8b66a73825c60ae27c264d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

5.2.1 This release

15 files

5.2.0

15 files

5.1.1

15 files

5.1.0

15 files

5.0.2

15 files

5.0.1

15 files

5.0.0

15 files

4.1.1

13 files

4.1.0

13 files

4.0.5

13 files

4.0.4

13 files

4.0.3

13 files

4.0.2

13 files

4.0.1

13 files

4.0.0

13 files

3.7.0

13 files

3.6.1

13 files

3.6.0

11 files

3.5.0

11 files

3.4.0

11 files

3.3.0

11 files

3.2.0

11 files

3.1.0

11 files

3.0.3

11 files

3.0.2

11 files

3.0.1

11 files

3.0.0

11 files

2.1.3

11 files

2.1.2

11 files

2.1.1

11 files

2.1.0

10 files

2.0.16

10 files

2.0.15

10 files

2.0.14

10 files

2.0.13

10 files

2.0.12

10 files

2.0.11

7 files

2.0.10

7 files

2.0.9

7 files

2.0.8

7 files

2.0.7

7 files

2.0.6

7 files

2.0.5

7 files

2.0.4

7 files

2.0.3

7 files

2.0.2

7 files

2.0.1

7 files

2.0.0

7 files

1.7.3

7 files

1.7.2

7 files

1.7.1

7 files

1.7

7 files

1.6.6

7 files

1.6.5

7 files

1.6.4

7 files

1.6.3

7 files

1.6.2

7 files

1.6.1

7 files

1.6

7 files

1.5.1

7 files

1.5

7 files

1.4

7 files

1.3.6

5 files

1.3.5

5 files

1.3.4

5 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page