pywinauto_recorder.player.focus_on_application

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

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

Parameters

application – UIApplication object or None The UIApplication object representing the application to focus on. If None, the focus is cleared.