pywinauto_recorder.player.select_file
- pywinauto_recorder.player.select_file(window_path, full_path, force_slow_path_typing=False)[source]
Selects a file in an already opened file dialog.
Example of code using ‘select_file’:from pywinauto_recorder.player import select_file select_file("Document - WordPad||Window->Open||Window", "Documents/file.txt")
To make this code work, you must first launch ‘WordPad’ and click on ‘File->Open’.
- Parameters
window_path (
Union[str,UIAWrapper,NewType()(UI_Coordinates, (float,float))]) – window path of the file dialog (e.g. “Untitled - Paint||Window->Save As||Window”full_path (
str) – the full path of the file to selectforce_slow_path_typing (
bool) – if True it will type the path even if the current path of the dialog box is the same as the file to select
- Raises
FailedSearch – if an element is not found
- Return type
None