Condition Factory
flaui.core.condition_factory.ConditionFactory
Bases: BaseModel
ConditionFactory wraps a ConditionFactory object from FlaUI.Core.Conditions module. This class provides methods to create PropertyConditions based on automation id, control type, class name, name, and text.
by_automation_id(automation_id, condition_flags_property_condition_flags=PropertyConditionFlags.None_)
Creates a condition to search by an automation id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
automation_id
|
str
|
Automation ID |
required |
condition_flags_property_condition_flags
|
PropertyConditionFlags
|
Contains values used in creating property conditions, defaults to PropertyConditionFlags.none |
None_
|
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |
Source code in flaui/core/condition_factory.py
by_class_name(class_name, condition_flags_property_condition_flags=PropertyConditionFlags.None_)
Creates a condition to search by a class name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
class_name
|
Union[str, KnownClassNames]
|
Class Name |
required |
condition_flags_property_condition_flags
|
PropertyConditionFlags
|
Contains values used in creating property conditions, defaults to PropertyConditionFlags.none |
None_
|
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |
Source code in flaui/core/condition_factory.py
by_control_type(control_type)
Creates a condition to search by a ControlType.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
control_type
|
ControlType
|
Types of controls in Microsoft UI Automation. |
required |
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |
Source code in flaui/core/condition_factory.py
by_framework_id(framework_id, condition_flags_property_condition_flags=PropertyConditionFlags.None_)
Creates a condition to search by a Framework Id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
framework_id
|
str
|
Framework ID |
required |
condition_flags_property_condition_flags
|
PropertyConditionFlags
|
Contains values used in creating property conditions, defaults to PropertyConditionFlags.none |
None_
|
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |
Source code in flaui/core/condition_factory.py
by_framework_type(framework_type)
Creates a condition to search by a Framework Type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
framework_type
|
FrameworkType
|
Framework Type |
required |
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |
Source code in flaui/core/condition_factory.py
by_help_text(help_text, condition_flags_property_condition_flags=PropertyConditionFlags.None_)
Creates a condition to search by a help text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
help_text
|
str
|
Help text |
required |
condition_flags_property_condition_flags
|
PropertyConditionFlags
|
Contains values used in creating property conditions, defaults to PropertyConditionFlags.none |
None_
|
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |
Source code in flaui/core/condition_factory.py
by_localized_control_type(localized_control_type, condition_flags_property_condition_flags=PropertyConditionFlags.None_)
Creates a condition to search by a localized control type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
localized_control_type
|
str
|
Localized Control Type |
required |
condition_flags_property_condition_flags
|
PropertyConditionFlags
|
Contains values used in creating property conditions, defaults to PropertyConditionFlags.none |
None_
|
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |
Source code in flaui/core/condition_factory.py
by_name(name, condition_flags_property_condition_flags=PropertyConditionFlags.None_)
Creates a condition to search by a name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name |
required |
condition_flags_property_condition_flags
|
PropertyConditionFlags
|
Contains values used in creating property conditions, defaults to PropertyConditionFlags.none |
None_
|
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |
Source code in flaui/core/condition_factory.py
by_process_id(process_id)
Creates a condition to search by a process id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
process_id
|
int
|
Process ID |
required |
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |
Source code in flaui/core/condition_factory.py
by_text(text, condition_flags_property_condition_flags=PropertyConditionFlags.None_)
Creates a condition to search by a text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value |
required |
condition_flags_property_condition_flags
|
PropertyConditionFlags
|
Contains values used in creating property conditions, defaults to PropertyConditionFlags.none |
None_
|
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |
Source code in flaui/core/condition_factory.py
by_value(value, condition_flags_property_condition_flags=PropertyConditionFlags.None_)
Creates a condition to search by a value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
str
|
Value |
required |
condition_flags_property_condition_flags
|
PropertyConditionFlags
|
Contains values used in creating property conditions, defaults to PropertyConditionFlags.none |
None_
|
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |
Source code in flaui/core/condition_factory.py
grid()
Searches for a DataGrid/List.
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |
horizontal_scroll_bar()
Searches for a horizontal scrollbar.
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |
menu()
Searches for a Menu/MenuBar.
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |
Source code in flaui/core/condition_factory.py
vertical_scroll_bar()
Searches for a vertical scrollbar.
Returns:
| Type | Description |
|---|---|
PropertyCondition
|
Property Condition |