# `Excessibility.LiveView`
[🔗](https://github.com/lessthanseventy/excessibility/blob/v0.18.1/lib/live_view.ex#L11)

LiveView HTML extraction for snapshot testing.

Renders `Phoenix.LiveViewTest.View` and `Phoenix.LiveViewTest.Element`
structs to HTML for accessibility testing.

This module communicates with the LiveView test proxy to extract the
current rendered HTML, including all nested LiveView components.

## Usage

This module is used automatically when you call `html_snapshot/2` with
a LiveView test view or element. You typically don't need to call it directly.

## Configuration

Can be mocked via the `:live_view_mod` config key:

    Application.put_env(:excessibility, :live_view_mod, MyMockLiveView)

# `get_assigns`

Extracts assigns from a LiveView test view.

Returns `{:ok, assigns}` if successful, `{:error, reason}` otherwise.

Reads the assigns from the LiveView channel process state rather than
the test client proxy — the proxy has no `handle_call/3` clause for
state introspection, so asking it would crash it and, through the test
process link, the calling test. Assigns metadata is best-effort, so any
failure here degrades to an error tuple instead of raising.

# `render_tree`

Renders a LiveView test view or element to HTML.

## Parameters

- `view` - A `Phoenix.LiveViewTest.View` or `Phoenix.LiveViewTest.Element`

## Returns

The rendered HTML as a Floki-parsed tree.

# `render_tree`

---

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