application
The application module is the main one that users will user first.
The application module is accessible via the pywinauto module.
When starting to automate and application you must initialize an instance of the Application class. Then you must start_() that application or Connect_() to a running instance of that application.
Once you have an Application instance you can access dialogs in that application either by using one of the methods below.
dlg = app.YourDialogTitle dlg = app.Window_(title = "your title", classname = "your class", ...) dlg = app['Your Dialog Title']
Similarly once you have a dialog you can get a control from that dialog in almost exactly the same ways.
ctrl = dlg.YourControlTitle ctrl = dlg.Window_(title = "Your control", classname = "Button", ...) ctrl = dlg["Your control"]
Note: For attribute access of controls and dialogs you do not have to have the title of the control exactly, it does a best match of the avialable dialogs or controls.
- See also:
- findwindows.find_windows() for the keyword arguments that can be passed to both Application.window_() and WindowSpecification.Window_()
Attributes
Functions
f AssertValidProcess(process_id) ...
Raise ProcessNotFound error if process_id is not a valid process id
Classes
C AppStartError(...) ...
There was a problem starting the Application
This class contains 2 members.
C ProcessNotFoundError(...) ...
Could not find that process
This class contains 2 members.
C AppNotConnected(...) ...
Application has been connected to a process yet
This class contains 2 members.
C WindowSpecification(...) ...
A specificiation for finding a window or control
Windows are resolved when used. You can also wait for existance or non existance of a window
This class contains 12 members.
C Application(...) ...
Represents an application
This class contains 22 members.
See the source for more information.