Robot Framework WhiteLibrary

raw JSON →
1.6.0 verified Fri May 01 auth: no python

Windows GUI testing library for Robot Framework, version 1.6.0. Uses White (a .NET UI automation framework) to interact with Windows applications. Provides Robot Framework keywords for launching, attaching, and controlling windows, controls, and UI elements. Release cadence is irregular, with minor updates every few months.

pip install robotframework-whitelibrary
error ImportError: No module named 'WhiteLibrary'
cause The installed package is 'robotframework-whitelibrary', but import uses 'WhiteLibrary'. Ensure the package is installed and the import is correct.
fix
Run pip install robotframework-whitelibrary and use Library WhiteLibrary in Robot Framework settings.
error System.InvalidOperationException: Could not find a window ...
cause WhiteLibrary cannot find the window with the given criteria. The application may not be running, or the window title/identifier is incorrect.
fix
Ensure the application is launched (use Launch Application or attach manually). Check the window title or use Attach Window By Title with correct string. For dynamic windows, use Wait Until Item Exists or increase timeout.
error AttributeError: 'WhiteLibrary' object has no attribute 'some_keyword'
cause The keyword does not exist in the version installed. Possibly using a newer keyword like `Wait Until Item Exists` (available since v1.5.0) on an older version.
fix
Upgrade WhiteLibrary with pip install --upgrade robotframework-whitelibrary or check the keyword name in the documentation of your installed version.
breaking Backwards incompatible changes in v1.5.0: Error messages for keywords `Window Should Be Maximized`, `Window Should Be Minimized` and `Window Should Be Closed` have changed. Tests that assert on exact error messages may break.
fix Update any robot test cases that check the error messages of these keywords to match the new format.
deprecated The locator format 'type:value' introduced in v1.2.0 may be deprecated or changed in future versions. The old plain locators (e.g., `id:15`) still work but check docs for preferred format.
fix Use the recommended locator format from the official documentation. For most cases, `id:value` is fine.
gotcha WhiteLibrary is Windows-only. It uses .NET Framework and White, which only run on Windows. Running tests on Linux or macOS will fail with platform errors.
fix Ensure tests are executed on Windows with .NET Framework installed. Use conditional execution or skip on non-Windows platforms.
gotcha The library relies on White's UI automation, which is sensitive to timing. It's common to encounter `ItemNotFoundException` or timeout errors if the UI element hasn't appeared yet. Use `Wait Until Item Exists` (v1.5.0+) or increase timeouts.
fix Use `Wait Until Item Exists` (only in v1.5.0+) or increase the `white_find_window_timeout` and `white_busy_timeout` settings. Alternatively, add explicit `Sleep` statements.

Launch Notepad, type text, and close the window. Demonstrates basic usage of Launch Application, Attach Window By Title, Type Text, and Close Window keywords.

*** Settings ***
Library    WhiteLibrary

*** Test Cases ***
Open Notepad and Type Text
    Launch Application    notepad.exe
    Attach Window By Title    Untitled - Notepad
    Type Text    id:15    Hello, Robot Framework!
    Sleep    1s
    Close Window