View Source Pages (Pages v0.2.6)

Entry point for interacting with pages.

Pages are built around Pages.Driver.t/0 structs. Drivers hold state about the current connection, implement @behavior Pages.Driver and must implement the String.Chars protocol to transform themselves into HTML.

available-drivers

Available drivers

Link to this section Summary

Functions

Simulates clicking on an element at selector with title title.

Instantiates a new page.

Re-renders the page

Submits a form without specifying any attributes.

Fills in a form with attributes and submits it.

Fills in a form with attributes without submitting it.

Visits path.

Link to this section Types

@type attrs_t() :: Keyword.t() | map()
@type html_t() :: Floki.html_tree()
@type page_type_t() :: :live_view

Link to this section Functions

Link to this function

click(page, title, selector)

View Source

Simulates clicking on an element at selector with title title.

@spec new(Plug.Conn.t()) :: Pages.Driver.t()

Instantiates a new page.

@spec rerender(Pages.Driver.t()) :: Pages.Driver.t()

Re-renders the page

Link to this function

submit_form(page, selector)

View Source
@spec submit_form(Pages.Driver.t(), Pages.Css.selector()) :: Pages.Driver.t()

Submits a form without specifying any attributes.

Link to this function

submit_form(page, selector, schema, attrs)

View Source
@spec submit_form(Pages.Driver.t(), Pages.Css.selector(), atom(), attrs_t()) ::
  Pages.Driver.t()

Fills in a form with attributes and submits it.

Link to this function

update_form(page, selector, schema, attrs)

View Source
@spec update_form(Pages.Driver.t(), Pages.Css.selector(), atom(), attrs_t()) ::
  Pages.Driver.t()

Fills in a form with attributes without submitting it.

@spec visit(Pages.Driver.t(), Path.t()) :: Pages.Driver.t()

Visits path.