Excessibility.BrowserBehaviour behaviour (Excessibility v0.5.13)

View Source

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.

Summary

Callbacks

Extracts the page source HTML from a Wallaby session.

Callbacks

page_source(t)

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

Extracts the page source HTML from a Wallaby session.

Parameters

Returns

The page HTML as a string.