# `Excessibility.BrowserBehaviour`
[🔗](https://github.com/lessthanseventy/excessibility/blob/v0.18.1/lib/browser_behavior.ex#L1)

Behaviour for browser page source extraction.

This behaviour defines the interface for extracting HTML from Wallaby
browser sessions.

## Mocking

Implement this behaviour to mock browser operations in tests:

    Mox.defmock(Excessibility.BrowserMock, for: Excessibility.BrowserBehaviour)
    Application.put_env(:excessibility, :browser_mod, Excessibility.BrowserMock)

The default implementation uses `Wallaby.Browser.page_source/1`.

# `page_source`

```elixir
@callback page_source(Wallaby.Session.t()) :: String.t()
```

Extracts the page source HTML from a Wallaby session.

## Parameters

- `session` - A `Wallaby.Session` struct

## Returns

The page HTML as a string.

---

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