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

Interact with a Playwright `Artifact`.

Artifacts are Playwright-owned files produced by operations such as tracing or
downloads. Local Playwright connections expose a finished artifact path
directly, while remote connections require streaming the artifact bytes through
the protocol.

# `opt`

```elixir
@type opt() :: {:connection, GenServer.name()} | {:timeout, timeout()}
```

# `delete`

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

Deletes an artifact from Playwright.

# `save_as`

```elixir
@spec save_as(PlaywrightEx.guid(), Path.t(), [opt() | PlaywrightEx.unknown_opt()]) ::
  :ok | {:error, any()}
```

Saves an artifact to `path`.

For local Playwright connections this copies the finished artifact file. For
remote Playwright connections this streams the artifact through the Playwright
protocol.

---

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