Class

XCUIApplication

A proxy for an application that can be launched and terminated.

Topics

Creating an Application Proxy

init()

Creates a proxy for the application specified as the "Target Application" in Xcode's target settings.

init(bundleIdentifier: String)

Creates a proxy for an application associated with the specified bundle identifier.

init(url: URL)

Creates a proxy for the application at the specified file system URL.

Launching the Application

func launch()

Launches the application.

var launchArguments: [String]

The arguments that will be passed to the application on launch.

var launchEnvironment: [String : String]

The environment variables that will be passed to the application on launch.

Activating the Application

func activate()

Activates the application.

Terminating the Application

func terminate()

Terminates any running instance of the application.

Determining Application State

var state: XCUIApplication.State

The most recently observed state of the application.

enum XCUIApplication.State

The possible states an application can be in during UI testing.