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.0.tar.gz (326.6 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.0-cp314-cp314-win_amd64.whl (363.9 kB view details)

Uploaded CPython 3.14Windows x86-64

robotframework_flaui-5.2.0-cp314-cp314-win32.whl (363.9 kB view details)

Uploaded CPython 3.14Windows x86

robotframework_flaui-5.2.0-cp313-cp313-win_amd64.whl (353.7 kB view details)

Uploaded CPython 3.13Windows x86-64

robotframework_flaui-5.2.0-cp313-cp313-win32.whl (353.7 kB view details)

Uploaded CPython 3.13Windows x86

robotframework_flaui-5.2.0-cp312-cp312-win_amd64.whl (353.7 kB view details)

Uploaded CPython 3.12Windows x86-64

robotframework_flaui-5.2.0-cp312-cp312-win32.whl (353.7 kB view details)

Uploaded CPython 3.12Windows x86

robotframework_flaui-5.2.0-cp311-cp311-win_amd64.whl (353.7 kB view details)

Uploaded CPython 3.11Windows x86-64

robotframework_flaui-5.2.0-cp311-cp311-win32.whl (353.7 kB view details)

Uploaded CPython 3.11Windows x86

robotframework_flaui-5.2.0-cp310-cp310-win_amd64.whl (353.7 kB view details)

Uploaded CPython 3.10Windows x86-64

robotframework_flaui-5.2.0-cp310-cp310-win32.whl (353.7 kB view details)

Uploaded CPython 3.10Windows x86

robotframework_flaui-5.2.0-cp39-cp39-win_amd64.whl (353.7 kB view details)

Uploaded CPython 3.9Windows x86-64

robotframework_flaui-5.2.0-cp39-cp39-win32.whl (353.7 kB view details)

Uploaded CPython 3.9Windows x86

robotframework_flaui-5.2.0-cp38-cp38-win_amd64.whl (353.6 kB view details)

Uploaded CPython 3.8Windows x86-64

robotframework_flaui-5.2.0-cp38-cp38-win32.whl (353.6 kB view details)

Uploaded CPython 3.8Windows x86

File details

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

File metadata

  • Download URL: robotframework_flaui-5.2.0.tar.gz
  • Upload date:
  • Size: 326.6 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.0.tar.gz
Algorithm Hash digest
SHA256 9f19af96f00fa1b4e0296bea8a2067153eaec34251181bcee4bbb7a06594e4b7
MD5 2b98b85af9a91beb715381a5f783f584
BLAKE2b-256 17e961b645f819748d9a4572d3f94a719a57a5df4604d4e2c982dd1c5412dbe3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.2.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 a0a5ed64489adf5ae7fbc2205956bea31d20c4d398dcfc838f5136227325123b
MD5 1b4768e0f1a32cdc5f6118a43c42b84e
BLAKE2b-256 de01a4c511f21a2c87e337bf7ef9bb06be38a5850054075279631efe13d07d93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.2.0-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 a35d3638af51da786ed50ec781a36a191d4b92e39e1abe7c1dc5fbc091360bba
MD5 648be6b819de0273328cb4379d5fd38b
BLAKE2b-256 404baac6c6ca1e8cec45d929c005277d56e6f29dabbd3ca99c6555962605fd5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 40dd46ecb224e75366be43ff503ab5ff5da8f4c0776066fd9b78078b89247344
MD5 0c0858085820796414a0fad87f779f16
BLAKE2b-256 939681b89a9d51500c01abc78dd16e3e5d1bb8484b5159c12871943833e3338c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.2.0-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 fae18770d061f96e06e071378d68e732926a80cba8038c2067c375bc1691af66
MD5 a7ea5ba71536b24f6a8d855129f7c3e0
BLAKE2b-256 aaabaee8f11c78b30a36024068bb509bf49ddc3d8633de5d7c8253377b4ab6dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b18fa7cf30e71b1b83fdffde412cd36b706b0b874f09c7faa6ad74b269f2dbc7
MD5 6ec86cb01a51199879cba9dc8f42c978
BLAKE2b-256 3ef7ee93fd0dd974150cebee393dae2084244da135ae4b583c9c33def686dd9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.2.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 d03672ce51c9c95af521ee0b346c90eaea59b01b5391f56e120e552f622ad1d1
MD5 628a41d98b2566e6652ed7ad80133e5b
BLAKE2b-256 f70f3dd7eb2e7dd764335f7406854b894bb019f1ce36e83a9950d6507b6a762c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 839160e717d653f5abe5e7e508a3c071256abe3e76b7f85057fd30f56a3f032b
MD5 6343ad8c15746cb49df3e06e5aa08ba0
BLAKE2b-256 8f5ec0b7da85bca5ea2a2760504b770ae07903d5d16f5715c9986bb5b0d65bcf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.2.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 c92336d3fc3a53280f66e424b64eaffe5eaff34d72a8288b3bdebcbe940e1dd3
MD5 8d8a761634b2453d4e19fb3dd8335d96
BLAKE2b-256 0e7a53ca5a5fa18ca1cc090658039d800f9ec0ac8952d3c42a38380fde0a078b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7344d6dc3c22f9d4c54548ac2678231c02fe16b470f5ea6a68100141b33f2234
MD5 eb76f3fdca7b229060a06e67da55748b
BLAKE2b-256 0b73dada224976cb1433fc409cb955a76196155b7306c26784e216b2410ab6be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.2.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 18036e9f7d2856222163de87ef9c28043b7f70221c16dc90c75c2c2805d4db56
MD5 d2f8d8afd7f092289ac6b64e699575c4
BLAKE2b-256 4c997984053f88779cc049e4ab5b2835f5ae5402ce22cdde907c46764b52a7f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a2c38017896c7ea4cc8aa4d4c9c01b1a7e4738d486c99020912e072cecb6e18f
MD5 c68e7748426126512d3bfe03c0bc5cca
BLAKE2b-256 b90bcdab67c1dede1f2fc0ac2a1218373bca93ff8df1fed5eb245742e5d98446

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.2.0-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 e17a23619c20fdec7ae30c4b767e61fd24183cb75ea0757b474f6a1c4598e5be
MD5 9bd6ef7ad6cc7eb88f9882e392af6d49
BLAKE2b-256 25d655a61b0925fb30eec8807da6e6177ae43dd309671dd2242bba4f68105e36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 33b81e6992651247a72e9ed16910e67b80b61892448de82c90686801c2063258
MD5 2723eee3b6b0042c18b9296e9bffc003
BLAKE2b-256 17516141321cb3755fecfb94df48b6dd55290cc698c11231e63cd52f27d2ee9e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for robotframework_flaui-5.2.0-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 12b6d9b1fc55fca0586665f2cc45e6927ae0777b4050c41e0e0916280e78f0fc
MD5 c1736e450b795628bf129566ee63cf90
BLAKE2b-256 8360160c5c54a5c0b6838ba1326e7cc097ccd7dfb3215dc4931f33c32d719506

See more details on using hashes here.

Release history Release notifications | RSS feed

5.2.1

15 files

This release

5.2.0 This release

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