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.1.0.tar.gz (323.3 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.1.0-cp314-cp314-win_amd64.whl (360.1 kB view details)

Uploaded CPython 3.14Windows x86-64

robotframework_flaui-5.1.0-cp314-cp314-win32.whl (360.1 kB view details)

Uploaded CPython 3.14Windows x86

robotframework_flaui-5.1.0-cp313-cp313-win_amd64.whl (349.9 kB view details)

Uploaded CPython 3.13Windows x86-64

robotframework_flaui-5.1.0-cp313-cp313-win32.whl (349.9 kB view details)

Uploaded CPython 3.13Windows x86

robotframework_flaui-5.1.0-cp312-cp312-win_amd64.whl (349.9 kB view details)

Uploaded CPython 3.12Windows x86-64

robotframework_flaui-5.1.0-cp312-cp312-win32.whl (349.9 kB view details)

Uploaded CPython 3.12Windows x86

robotframework_flaui-5.1.0-cp311-cp311-win_amd64.whl (349.9 kB view details)

Uploaded CPython 3.11Windows x86-64

robotframework_flaui-5.1.0-cp311-cp311-win32.whl (349.9 kB view details)

Uploaded CPython 3.11Windows x86

robotframework_flaui-5.1.0-cp310-cp310-win_amd64.whl (349.9 kB view details)

Uploaded CPython 3.10Windows x86-64

robotframework_flaui-5.1.0-cp310-cp310-win32.whl (349.9 kB view details)

Uploaded CPython 3.10Windows x86

robotframework_flaui-5.1.0-cp39-cp39-win_amd64.whl (349.9 kB view details)

Uploaded CPython 3.9Windows x86-64

robotframework_flaui-5.1.0-cp39-cp39-win32.whl (349.9 kB view details)

Uploaded CPython 3.9Windows x86

robotframework_flaui-5.1.0-cp38-cp38-win_amd64.whl (349.8 kB view details)

Uploaded CPython 3.8Windows x86-64

robotframework_flaui-5.1.0-cp38-cp38-win32.whl (349.8 kB view details)

Uploaded CPython 3.8Windows x86

File details

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

File metadata

  • Download URL: robotframework_flaui-5.1.0.tar.gz
  • Upload date:
  • Size: 323.3 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.1.0.tar.gz
Algorithm Hash digest
SHA256 ca23f355c6e66948a44ea130faa37b4fa569956fd3a60456495b26f3141daffc
MD5 5e46fb179db1eb2d328df60808007494
BLAKE2b-256 0ca847823ddcb2ac0f57568a33f6bd12666f6a98490a376d77b00a6b2a7b3cef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.1.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 639db9fdb01a79ee9d5000f979ab18892d2b88aea0e481f582cfd9797052523a
MD5 cb677755775ecfabae17db2cbcc71122
BLAKE2b-256 8dbf21f597ae48d189b8530034086c56e53d3352fa7d63286cbdfbdb762de74e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.1.0-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 e50a25ee36d0431419bfae914083eb31b1f9e1686cafb1cf4fe7325e44ec20f6
MD5 bdc79abcbb4df50517407c7a1b6314dc
BLAKE2b-256 05fef0f859a6df36ac76dcad1cd35f8671bd869fc739bfe537682a389bf2f3c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b95e79d139d81fffc16d302c21a80f6f5c93c0912064d39c5b3c12a5a0b16746
MD5 451b301f2bb91fb70567633bc4070461
BLAKE2b-256 d4118ce56dc1f98366d41d088bcf12408a85addade212fbd8d779890a92bc13a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.1.0-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 8835eca34295dd20020bdd83ea4505ce256361e77b636dcb767a9146dfc7bba3
MD5 7c1fb06aca6b6b9dbb3840747d0be887
BLAKE2b-256 90d2184eadf511f440b4318dcaaa64fc954d6f0919f81af4dac7c70a0fa240d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e4e4655a9e2547baab60c48389e88035973281250b0fa812a34fef46714fea3d
MD5 b89d1f8dc7e2416c23c5940dd5a70aec
BLAKE2b-256 93a7480d2e75422d05b7cd912a468927d2776f1f17ea2a3153b4216e62ddb2c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.1.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 b7838a7ae671ec71a54e72cae6d0fa6b2a68da35c30c8146f3ab0f64eaed94d2
MD5 872323021c9f80ca98dc20472bd885f8
BLAKE2b-256 8ab5343e3dadf7cb1a63b6d29864f5f2c1eebb1cc4a146d2a6ec48cc30b1f66f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ff23e08bbae5c9ac63df51255665b4428e292d0709c1493d854af962e71b99d9
MD5 cf25ba90fb63862f98028a6da3c51bb0
BLAKE2b-256 f4f2a73474b5ac0b34a5fd7f18f162f8691ee5ddf76e90fc733bf5d50b13b26e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.1.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 fc8f3ed6eec8c761df830c4b1d94f67f1695612b653371331ea1ffd389304978
MD5 c5cdcbd180334044d2c058eb37ce6ae7
BLAKE2b-256 e03d9f52c02e7897a9caca919b249f688f17228d26b655d024a1819b6fb0b5d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ea05e89812c4de50f83c040015b47fd69563e71d4affd1489c39dff18f7b4ff9
MD5 f545fd26f4f40b35cd2641042102fc94
BLAKE2b-256 7cda7d3db5ea74b546398b0b9fa0966b36bfe240d6624607bb24dc61a4daf6ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.1.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 4e715ac655fd2dfff6f019c53477934bf833c886c0d0476d1d73d031324a6246
MD5 40efbcb18ae40f541640fca0ad297e38
BLAKE2b-256 3236948101547e9ce8cea7b53d6a960fabc31f782887a78d43b09dc8e09dc685

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 01435ee0db2bc81492db97d27ce0031de015e2839de7a1f47864079fac5cb722
MD5 2c6fa890e52309ce8b21303410a16b80
BLAKE2b-256 79abebf442355ce14c2e4d21e93172fb9c54a6f34094136d788888ef2bcca177

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.1.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 26fef9db2a5e13f3cfc1d3ba0e3c196807c9222638685c367152201268312014
MD5 4edfaf9f1633784b0f5e805924805f24
BLAKE2b-256 77bff8bd1bf16688e2bbf785a765b9d1f18d6436dac721847a570078941b0e8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.1.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d11178b11f8863d570a3ee8096795be3ffb5d7ebaab0508372be068ded979be6
MD5 68a7e391541cbf9b33e4744156a4038b
BLAKE2b-256 26daa56e6766358b060abad1e34b63f30e534c88135c54334dfc912fad712dbd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.1.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 fee6ade2cbc23c9e75d2e4cf6124d0a1d5bd70256f84a26076f45e91948569df
MD5 0b2c761adefef6f7d5844d5423b5ce69
BLAKE2b-256 deaeb2916cbaace6c06503aae184cedd5c753892eaca1d16084531330b40dd8c

See more details on using hashes here.

Release history Release notifications | RSS feed

5.1.1

15 files

This release

5.1.0 This release

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