Window
flaui.core.automation_elements.Window
Bases: AutomationElement
Class to interact with a window element.
context_menu
property
Gets the context menu for the window. /// Note: It uses the FrameworkType of the window as lookup logic. Use GetContextMenuByFrameworkType" /> if you want to control this.
Returns:
| Type | Description |
|---|---|
Menu
|
Context menu item |
is_main_window
property
writable
Flag to indicate, if the window is the application's main window. Is used so that it does not need to be looked up again in some cases (e.g. Context Menu).
Returns:
| Type | Description |
|---|---|
bool
|
True if the window is main window else False |
is_modal
property
Gets if the window is modal.
Returns:
| Type | Description |
|---|---|
bool
|
True if window is modal, else False |
popup
property
title
property
Gets the title of the window.
Returns:
| Type | Description |
|---|---|
str
|
Title value |
title_bar
property
close()
get_context_menu_by_framework_type(framework_type)
Gets the context menu by a given FrameworkType.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
framework_type
|
FrameworkType
|
Framework Type |
required |
Returns:
| Type | Description |
|---|---|
Menu
|
Menu item |
Source code in flaui/core/automation_elements.py
modal_windows()
Gets a list of all modal child windows.
Returns:
| Type | Description |
|---|---|
List[Window]
|
List of window elements |
Source code in flaui/core/automation_elements.py
move(x, y)
Moves the window to the given coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
int
|
X cordinate |
required |
y
|
int
|
Y cordinate |
required |
set_transparency(alpha)
Brings the element to the foreground.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
alpha
|
bytes
|
Transparency value |
required |