The most recently observed state of the application.
- Xcode 9.0+
Applications are passively monitored to update this property as they change state. Consequently, updates to this property are inherently asynchronous.
Some guarantees are made, however:
activate()return, if they were successful, the state of the application will be
XCUIApplication. An exception to this launching or activating a macOS agent application with LSUIElement set in its Info.plist file. This kind of application never gains foreground status and will be
.State .running Foreground
.State .running Background