pywinauto_recorder.player.focus_on_application

pywinauto_recorder.player.focus_on_application(application_or_window=None)[source]

Focuses on a specified application by bringing its main window to the foreground. If ‘application_or_window’ is None, it clears the focus, allowing subsequent automation commands to target any window without restrictions.

Parameters

application_or_window – UIApplication object, UIAWrapper object of a main window or None The object to focus on the main window. If None, the focus is cleared.