> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simular.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# App

> An installed application on a machine, ready to be opened.

Obtain via \[`Machine.app`], \[`Machine.fuzzyApp`], \[`Machine.apps`], or
\[`Machine.defaultBrowser`]. The handle stays bound to the machine it
came from.

## Constructor

```typescript
App(): App
```

### Returns

`App`

## Properties

<ResponseField name={"canonicalName"} type={"null | string"} required>
  Returns the canonical app name used for fuzzy matching (Android: the
  package name).
</ResponseField>

<ResponseField name={"launchTarget"} type={"null | string"} required>
  Returns the launch target used to open the app: a name or path
  locally, the package name on Android.
</ResponseField>

## Methods

### open()

```typescript
open(url: undefined | null | string, focusPolicy: FocusPolicy, visibility: Visibility, waitForLoadComplete: boolean): Instance
```

Opens or switches to the application. If a URL is provided, the URL
is opened with this app.

`focus_policy` controls whether the app is allowed to become
active/frontmost. Some applications (e.g. Chrome, Notes) ignore this
request and steal focus regardless. `visibility` controls whether
the app is launched hidden or shown; some applications (e.g. Chrome
and other Chromium/Electron apps) ignore the hidden flag and launch
visibly. Android's activity model always launches visible and
focused.

When `wait_for_load_complete` is true, blocks until the instance
has a window (or the platform reports launch finished), up to
twenty seconds. Desktop timeouts are logged; Android treats them as
errors. Pass `false` for apps that never show a window. If the app
is already running, its existing windows satisfy the wait
immediately — this does not wait for whatever window or tab the
call may add.

#### Parameters

<ResponseField name={"url"} type={"undefined | null | string"} required />

<ResponseField name={"focusPolicy"} type={"FocusPolicy"} required />

<ResponseField name={"visibility"} type={"Visibility"} required />

<ResponseField name={"waitForLoadComplete"} type={"boolean"} required />

#### Returns

`Instance`
