View Source Pages (Pages v0.4.3)
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
Pages.Driver.Conn.t/0
- Given aPlug.Conn.t/0
, this driver will be used.Pages.Driver.LiveView.t/0
- Given aPlug.Conn.t/0
with inner data that appears as if aPhoenix.LiveView
is configured, this driver will be used.
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 page_type_t() :: :live_view
Link to this section Functions
@spec click(Pages.Driver.t(), binary(), HtmlQuery.Css.selector()) :: Pages.Driver.t()
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
@spec submit_form(Pages.Driver.t(), HtmlQuery.Css.selector()) :: Pages.Driver.t()
Submits a form without specifying any attributes.
@spec submit_form(Pages.Driver.t(), HtmlQuery.Css.selector(), atom(), attrs_t()) :: Pages.Driver.t()
Fills in a form with attributes
and submits it.
@spec update_form(Pages.Driver.t(), HtmlQuery.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
.