Cache Request
flaui.core.cache_request.CacheRequest(_cs_instance=None)
Python wrapper for FlaUI.Core.CacheRequest.
Initialize CacheRequest.
Accepts either: - None: constructs a new C# CacheRequest() - A C# CacheRequest instance - An Automation wrapper: constructs C# CacheRequest(automation.cs_automation)
Source code in flaui/core/cache_request.py
automation_element_mode
property
writable
Get or set the automation element mode.
patterns
property
Get or set the patterns.
properties
property
Get or set the properties.
tree_filter
property
writable
Get or set the tree filter.
tree_scope
property
writable
Get or set the tree scope.
activate()
Activate the cache request. Returns a context manager/disposable.
Source code in flaui/core/cache_request.py
add(identifier)
Add a pattern or property to the cache request (C# CacheRequest.Add).
C# overloads Add for PatternId and PropertyId; this method accepts either, as the
Python :class:~flaui.core.identifiers.PatternId / :class:~flaui.core.identifiers.PropertyId
wrappers or as the raw C# identifiers (e.g. automation.cs_automation.PropertyLibrary.Element.Name).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
identifier
|
Union[PatternId, PropertyId, Any]
|
The pattern or property identifier to cache. |
required |
Source code in flaui/core/cache_request.py
add_pattern(pattern)
Add a pattern to the cache request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pattern
|
Union[PatternId, Any]
|
The pattern identifier, wrapped or raw C#. |
required |
add_property(property_)
Add a property to the cache request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
property_
|
Union[PropertyId, Any]
|
The property identifier, wrapped or raw C#. |
required |
current()
classmethod
Get the current active CacheRequest, if any.