Overlay
Visual-debugging overlays, ported from FlaUI.Core.Overlay. Each
AutomationBase exposes an OverlayManager via overlay_manager; it draws
a colored border around a screen rectangle for a short duration (the same mechanism used by
AutomationElement.draw_highlight).
flaui.core.overlay.OverlayManager
Bases: BaseModel
Wraps a C# IOverlayManager (WinFormsOverlayManager or NullOverlayManager).
margin
property
writable
Get the overlay margin (use a negative value to move it inside the rectangle).
size
property
writable
Get the overlay border size.
dispose()
show(rectangle, color, duration_in_ms)
Show the overlay for a duration asynchronously (non-blocking).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rectangle
|
Rectangle
|
The screen rectangle to outline. |
required |
color
|
ColorData
|
The border color. |
required |
duration_in_ms
|
int
|
How long to show the overlay, in milliseconds. |
required |
Source code in flaui/core/overlay.py
show_blocking(rectangle, color, duration_in_ms)
Show the overlay and block execution until it is hidden again.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rectangle
|
Rectangle
|
The screen rectangle to outline. |
required |
color
|
ColorData
|
The border color. |
required |
duration_in_ms
|
int
|
How long to show the overlay, in milliseconds. |
required |