View Source Pages.Driver behaviour (Pages v0.13.2)
Defines types and behaviours that page drivers must implement.
Link to this section Summary
Callbacks
Click an element within a page. Implementation for Pages.click/4
.
Render a change. Implementation for Pages.render_change/3
.
Render a hook event. Implementation for Pages.render_hook/3
.
Render a file upload. Implementation for Pages.render_upload/4
.
Re-renders the page. Implementation for Pages.rerender/1
.
Submit a form targeted by the given selector. Implementation for Pages.submit_form/2
.
Fills in a form with the attributes and submits it. Implementation for Pages.submit_form/4
.
Fills in a form with the attributes and submits it. Implementation for Pages.submit_form/5
.
Fills in a form with the attributes without submitting it. Implementation for Pages.update_form/4
.
Navigate directly to a page. Implementation for Pages.visit/2
.
Target a child component for actions. Implementation for Pages.with_child_component/3
.
Link to this section Types
@type t() :: Pages.Driver.Conn.t() | Pages.Driver.LiveView.t()
Link to this section Callbacks
@callback click( t(), Pages.http_method(), Pages.text_filter() | nil, HtmlQuery.Css.selector() ) :: Pages.result() | no_return()
Click an element within a page. Implementation for Pages.click/4
.
@callback render_change(t(), HtmlQuery.Css.selector(), Enum.t()) :: Pages.result()
Render a change. Implementation for Pages.render_change/3
.
@callback render_hook(t(), binary(), Pages.attrs_t(), keyword()) :: Pages.result()
Render a hook event. Implementation for Pages.render_hook/3
.
@callback render_upload(t(), Pages.live_view_upload(), binary(), integer()) :: Pages.result()
Render a file upload. Implementation for Pages.render_upload/4
.
@callback rerender(t()) :: Pages.result()
Re-renders the page. Implementation for Pages.rerender/1
.
@callback submit_form(t(), HtmlQuery.Css.selector()) :: Pages.result()
Submit a form targeted by the given selector. Implementation for Pages.submit_form/2
.
@callback submit_form(t(), HtmlQuery.Css.selector(), atom(), Pages.attrs_t()) :: Pages.result()
Fills in a form with the attributes and submits it. Implementation for Pages.submit_form/4
.
@callback submit_form( t(), HtmlQuery.Css.selector(), atom(), Pages.attrs_t(), Pages.attrs_t() ) :: Pages.result()
Fills in a form with the attributes and submits it. Implementation for Pages.submit_form/5
.
@callback update_form(t(), HtmlQuery.Css.selector(), atom(), Pages.attrs_t()) :: Pages.result()
Fills in a form with the attributes without submitting it. Implementation for Pages.update_form/4
.
@callback visit(t(), Path.t()) :: Pages.result()
Navigate directly to a page. Implementation for Pages.visit/2
.
Target a child component for actions. Implementation for Pages.with_child_component/3
.