pywinauto_recorder.player

This module contains functions to replay a sequence of user actions automatically.

Functions

load_dictionary(filename_key, filename_def)

Loads a dictionary.

shortcut(str_shortcut)

Returns the shortcut path associated to the shortcut defined in the previously loaded dictionary.

full_definition(str_shortcut)

Returns the full element path associated to the shortcut defined in the previously loaded dictionary.

find([element_path, regex, timeout])

Finds the element matching element_path.

find_all([element_path, timeout])

Finds all elements matching element_path.

move_window([element_path, x, y, width, height])

Moves and resizes a window

move([element_path, duration, mode, timeout])

Moves the mouse cursor over the user interface element.

click([element_path, duration, mode, ...])

Clicks on found element.

left_click([element_path, duration, mode, ...])

This function is a partial function derived from the click() general function. The parameters of the function are set with the following values: - button=ButtonLocation.left.

right_click([element_path, duration, mode, ...])

This function is a partial function derived from the click() general function. The parameters of the function are set with the following values: - button=ButtonLocation.right.

double_left_click([element_path, duration, ...])

This function is a partial function derived from the click() general function. The parameters of the function are set with the following values: - button=ButtonLocation.left - click_count=2.

triple_left_click([element_path, duration, ...])

This function is a partial function derived from the click() general function. The parameters of the function are set with the following values: - button=ButtonLocation.left - click_count=3.

double_click([element_path, duration, mode, ...])

This function is a partial function derived from the click() general function. The parameters of the function are set with the following values: - button=ButtonLocation.left - click_count=2.

triple_click([element_path, duration, mode, ...])

This function is a partial function derived from the click() general function. The parameters of the function are set with the following values: - button=ButtonLocation.left - click_count=3.

drag_and_drop(element_path1, element_path2)

Drags and drops from element_path1 to element_path2.

middle_drag_and_drop(element_path1, ...[, ...])

This function is a partial function derived from the drag_and_drop() general function. The parameters of the function are set with the following values: - button=ButtonLocation.middle.

right_drag_and_drop(element_path1, element_path2)

This function is a partial function derived from the drag_and_drop() general function. The parameters of the function are set with the following values: - button=ButtonLocation.right.

menu_click(menu_path[, duration, timeout, ...])

Clicks on the menu items.

mouse_wheel(steps[, pause])

Turns the mouse wheel up or down.

send_keys(str_keys[, pause, with_spaces, ...])

Parses the keys and type them You can use any Unicode characters (on Windows) and some special keys.

set_combobox(element_path, value[, ...])

Sets the value of a combobox.

set_text(element_path, value[, duration, ...])

Sets the value of a text field.

exists(element_path[, timeout])

Tests if the user interface element exists.

select_file(window_path, full_path[, ...])

Selects a file in an already opened file dialog.

playback([str_code, filename])

This function plays back a string of code or a Python file.

find_cache_clear()

Clears the cache of the find() function.

start_application(cmd_line[, timeout, ...])

This function starts an application

connect_application(**kwargs)

Connect to an already running application

focus_on_application([application_or_window])

Focuses on a specified application by bringing its main window to the foreground.

find_main_windows([main_window_uipath])

kill_application(application[, timeout])

This function kills an application.

Classes

PlayerSettings()

The player settings class contains the default settings.

MoveMode(value)

The MoveMode class is an enumeration of the different ways that the mouse can move.

ButtonLocation(value)

The ButtonLocation class is an enumeration of the different locations of the mouse buttons.

UIPath([relative_path, regex_title, ...])

UIPath is a context manager used to keep track of the current path in the UI tree.

Window

alias of UIPath

Region

alias of UIPath

UIApplication(app[, native_window_handle])