Element Cookbook
Control-by-control recipes against the bundled WPF test application. Each recipe shows the Python call next to the original FlaUI C# call. Pick a tab once and every recipe on the page switches with it.
Every Python snippet on this page runs
The Python tabs are included straight from
examples/pytest/test_element_cookbook.py,
one test per recipe, and the docs build fails if a referenced section disappears. Run them all:
All recipes assume a window (the main Window) and a condition factory cf. The
pytest example shows how to get both. In C#, cf is the lambda parameter of
FindFirstDescendant(cf => …).
Interactive controls
Button
CheckBox
RadioButton
ComboBox
TextBox
Slider
Containers
ListBox
Tree
The tree lives on the Complex Controls tab. The runnable test switches to that tab first.
Grid
Tab
Display
Label
ProgressBar
Windows & dialogs
Title bar buttons
FlaUI finds the title bar buttons by their AutomationIds. Standard Win32 and Store windows expose them; the WPF test app's title bar does not. The Calculator gallery script is an example where they work.