# `PlaywrightEx.BrowserType`
[🔗](https://github.com/ftes/playwright_ex/blob/v0.6.0/lib/playwright_ex/channels/browser_type.ex#L1)

Interact with a Playwright `BrowserType`.

There is no official documentation, since this is considered Playwright internal.

Reference: https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/client/browserType.ts

# `guid`

```elixir
@type guid() :: String.t()
```

# `launch_opt`

```elixir
@type launch_opt() ::
  {:connection, GenServer.name()}
  | {:timeout, timeout()}
  | {:channel, binary()}
  | {:executable_path, binary()}
  | {:headless, boolean()}
  | {:slow_mo, integer() | float()}
```

# `launch`

```elixir
@spec launch(PlaywrightEx.guid(), [launch_opt() | PlaywrightEx.unknown_opt()]) ::
  {:ok, %{guid: PlaywrightEx.guid()}} | {:error, any()}
```

Launches a new browser instance.

Reference: https://playwright.dev/docs/api/class-browsertype#browser-type-launch

## Options
* `:connection` (`t:term/0`) - The Connection process name. Defaults to `PlaywrightEx.Supervisor.Connection`. The default value is `PlaywrightEx.Supervisor.Connection`.

* `:timeout` (`t:timeout/0`) - Required. Maximum time for the operation (milliseconds).

* `:channel` (`t:String.t/0`) - Browser distribution channel.

* `:executable_path` (`t:String.t/0`) - Path to a browser executable to run instead of the bundled one.

* `:headless` (`t:boolean/0`) - Whether to run browser in headless mode.

* `:slow_mo` - Slows down Playwright operations by the specified amount of milliseconds.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
