View Source Pages.Driver behaviour (Pages v0.5.3)

Defines types and behaviours that page drivers must implement.

Link to this section Summary

Callbacks

Click an element within a page.

Re-renders the page

Submit a form targeted by the given selector.

Fills in a form with the attributes and submits it.

Fills in a form with the attributes without submitting it.

Navigate directly to a page.

Target a child component for actions.

Link to this section Types

Link to this section Callbacks

Link to this callback

click(t, http_method, binary, selector)

View Source (optional)
@callback click(t(), Pages.http_method(), binary(), HtmlQuery.Css.selector()) ::
  t() | no_return()

Click an element within a page.

@callback rerender(t()) :: t()

Re-renders the page

Link to this callback

submit_form(t, selector)

View Source (optional)
@callback submit_form(t(), HtmlQuery.Css.selector()) :: t()

Submit a form targeted by the given selector.

Link to this callback

submit_form(t, selector, atom, attrs_t)

View Source (optional)
@callback submit_form(t(), HtmlQuery.Css.selector(), atom(), Pages.attrs_t()) :: t()

Fills in a form with the attributes and submits it.

Link to this callback

update_form(t, selector, atom, attrs_t)

View Source (optional)
@callback update_form(t(), HtmlQuery.Css.selector(), atom(), Pages.attrs_t()) :: t()

Fills in a form with the attributes without submitting it.

@callback visit(t(), Path.t()) :: t()

Navigate directly to a page.

Link to this callback

with_child_component(t, child_id, function)

View Source (optional)
@callback with_child_component(t(), child_id :: binary(), (t() -> term())) :: t()

Target a child component for actions.