# `PlaywrightEx.BrowserType`
[🔗](https://github.com/ftes/playwright_ex/blob/v0.9.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()}
  | {:args, [binary()]}
  | {:executable_path, binary()}
  | {:ignore_all_default_args, boolean()}
  | {:ignore_default_args, [binary()]}
  | {:handle_sigint, boolean()}
  | {:handle_sigterm, boolean()}
  | {:handle_sighup, boolean()}
  | {:env, %{optional(atom() | binary()) =&gt; term()} | [map()]}
  | {:headless, boolean()}
  | {:proxy, map()}
  | {:downloads_path, binary()}
  | {:traces_dir, binary()}
  | {:artifacts_dir, binary()}
  | {:chromium_sandbox, boolean()}
  | {:firefox_user_prefs, %{optional(atom() | binary()) =&gt; term()}}
  | {:cdp_port, non_neg_integer()}
  | {: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.

* `:args` (list of `t:String.t/0`) - Additional command-line arguments passed to the browser.

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

* `:ignore_all_default_args` (`t:boolean/0`) - Whether to omit all Playwright default browser arguments.

* `:ignore_default_args` (list of `t:String.t/0`) - Specific Playwright default browser arguments to omit.

* `:handle_sigint` (`t:boolean/0`) - Whether Playwright handles SIGINT.

* `:handle_sigterm` (`t:boolean/0`) - Whether Playwright handles SIGTERM.

* `:handle_sighup` (`t:boolean/0`) - Whether Playwright handles SIGHUP.

* `:env` - Environment variables as a map or Playwright name/value entries.

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

* `:proxy` (`t:map/0`) - Proxy settings for the browser process.

* `:downloads_path` (`t:String.t/0`) - Directory in which to place downloads.

* `:traces_dir` (`t:String.t/0`) - Directory in which to place tracing data.

* `:artifacts_dir` (`t:String.t/0`) - Directory in which to place browser artifacts.

* `:chromium_sandbox` (`t:boolean/0`) - Whether Chromium sandboxing is enabled.

* `:firefox_user_prefs` - Firefox preferences, preserved as an opaque JSON object.

* `:cdp_port` (`t:non_neg_integer/0`) - Chrome DevTools Protocol port.

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

---

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