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.
Summary
Types
@type opt() :: {:connection, GenServer.name()} | {:timeout, timeout()}
Functions
@spec delete(PlaywrightEx.guid(), [opt() | PlaywrightEx.unknown_opt()]) :: {:ok, any()} | {:error, any()}
Deletes an artifact from Playwright.
@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.