Skip to content

Windows Actions

Windows Actions to interact with windows elements

Actions

windows.bring_to_front

Bring an element onto screen

Parameters:

element - Element to bring to screen

Return:

This action has no return

Exceptions:

This action has no exceptions

windows.click

Clicks in given element

Parameters:

element - Element to be clicked

button (optional) - Defines witch mouse button should de used for mouse down 'left', 'middle' or 'right' (default='left')

clicks (optional) - Defines how many clicks will be given (default=1)

Return:

x - X corresponding to the center of element matched

y - Y corresponding to the center of element matched

Exceptions:

This action has no exceptions

windows.close

Close a element

Parameters:

element - Element to be closed

Return:

This action has no return

Exceptions:

This action has no exceptions

windows.double_click

Double click in given element

Parameters:

element - Element to be clicked

button (optional) - Defines witch mouse button should de used for mouse down 'left', 'middle' or 'right' (default='left')

interval (optional) - Interval between each click, for slower computers, consider set a higher value than default (default=0.0)

Return:

x - X corresponding to the center of element matched

y - Y corresponding to the center of element matched

Exceptions:

This action has no exceptions

windows.find_all

Find all elements with given parameters

Parameters:

inside (optional) - (default=None)

automation_id (optional) - (default=None)

element_name (optional) - (default=None)

access_key (optional) - (default=None)

control_type (optional) - (default=None)

accelerator_key (optional) - (default=None)

Return:

elements - List with all found elements

Exceptions:

This action has no exceptions

windows.find_first

Find first elements with given parameters

Parameters:

inside (optional) - (default=None)

automation_id (optional) - (default=None)

element_name (optional) - (default=None)

access_key (optional) - (default=None)

control_type (optional) - (default=None)

accelerator_key (optional) - (default=None)

Return:

element - First element found

Exceptions:

This action giver no Exceptions

windows.get_all_windows

Get all windows

Parameters:

None

Return:

elements - List with found windows

Exceptions:

This action giver no Exceptions

windows.get_clipboard

Return the text value from clipboard

Parameters:

None

Return:

clipboard - Value from clipboard

Exceptions:

This action has no Exceptions

windows.get_element_from_position

Get the element where the cursor is

Parameters:

x - X position of mouse

y - Y position of mouse

Return:

element - Disered element

Exceptions:

This action has no Exceptions

windows.get_foreground_window

Get a window that is in foreground

Parameters:

None

Return:

element - Disered element

Exceptions:

This action has no Exceptions

windows.get_root

Parameters:

None

Return:

element - Disered element

Exceptions:

This action has no Exceptions

windows.get_window

Get a Windown by its name

Parameters:

window_name - Name of the window

Return:

element - Disered element

Exceptions:

This action has no Exceptions

windows.maximize

Maximize an element

Parameters:

element - Element to be maximized

Return:

This action has no return

Exceptions:

This action has no Exceptions

windows.minimize

Minimize an element

Parameters:

element - Element to be minimized

Return:

This action has no return

Exceptions:

This action has no Exceptions

windows.multi_click

Perform a multiple click action in given element

Parameters:

element - Element to be clicked

clicks - Number of clicks to be performed in the element (default=1)

button (optional) - Defines witch mouse button should de used for mouse down 'left', 'middle' or 'right' (default='left')

interval (optional) - Interval between each click, for slower computers, consider set a higher value than default (default=0.0)

Return:

x - X corresponding to the center of element matched

y - Y corresponding to the center of element matched

Exceptions:

This action giver no Exceptions

windows.open_file

Open a file

Parameters:

file_path - Path to file

Return:

This action giver no return

Exceptions:

This action giver no Exceptions

windows.open_program

Open a program

Parameters:

exe_path - Path to program

Return:

This action giver no return

Exceptions:

This action giver no Exceptions

windows.restore

Restore an element

Parameters:

element - Element to be restored

Return:

This action giver no return

Exceptions:

This action giver no Exceptions

windows.set_clipboard

Set a new value to clipboard

Parameters:

value - New value to be setted

Return:

This action giver no return

Exceptions:

This action giver no Exceptions

windows.set_value

Set a value to given element

Parameters:

element - Element to be setted

Return:

This action giver no return

Exceptions:

This action giver no Exceptions

windows.update_value

Update given element

Parameters:

element - Element to be updated

Return:

This action giver no return

Exceptions:

This action giver no Exceptions

windows.cpu_count

Returns the current cpu count

Parameters:

None

Return:

cpu_count - The current cpu count.

Exceptions:

This action giver no Exceptions

windows.cpu_count_cores

Returns the current cpu cores count

Parameters:

None

Return:

cpu_count - The current cpu cores count.

Exceptions:

This action giver no Exceptions

windows.cpu_percent

Returns the current cpu usage percentage

Parameters:

None

Return:

cpu_percent - The current cpu usage percentage.

Exceptions:

This action giver no Exceptions

windows.disk_info

Returns the disk info

Parameters:

disk - The disk to return the info.

Return:

disk - The disk overall info.

disk_usage_percent - The usage percentage from disk.

disk_total - The total from disk.

disk_free - Free space in disk.

disk_used - Used space in disk.

Exceptions:

This action giver no Exceptions

windows.disks

Returns disks from the partition

Parameters:

None

Return:

disks - A list of disks.

Exceptions:

This action giver no Exceptions

windows.has_process

Checks if a given process is there.

Parameters:

process_name - The name of the process you want to check.

Return:

has_process - either true or false.

Exceptions:

This action giver no Exceptions

windows.kill_process

Kills a given process

Parameters:

process_name - The name of the process you want to kill. pid - The PID of the process you want to kill.

Return:

This actions returns void.

Exceptions:

This action giver no Exceptions

windows.memory

Returns detailed information about the memory

Parameters:

None

Return:

total_memory - Total of memory.

available_memory - Available memory.

percent_used_memory - Used memory percentage.

free_memory - Free memory.

Exceptions:

This action giver no Exceptions

windows.process_pid

Returns a list of process by a given process name

Parameters:

process_name - The name of the process you want to check.

Return:

processes - A list of processes.

Exceptions:

This action giver no Exceptions