PlaywrightEx.Selector (PlaywrightEx v0.2.0)

View Source

Playright supports different types of locators: CSS, XPath, internal.

They can mixed and matched by chaining the together.

Also, you can register custom selector engines that run right in the browser (Javascript).

There is no official documentation, since this is considered Playwright internal.

References:

Summary

Types

built()

@type built() :: String.t()

exact_opts()

@type exact_opts() :: [{:exact, boolean()}]

t()

@type t() :: built() | :none

Functions

left and right

@spec t() and t() :: t()

at(at)

@spec at(nil | integer()) :: t()

build(selector)

@spec build(t()) :: built()

button(text, opts \\ [])

@spec button(String.t(), exact_opts()) :: t()

concat(left, right)

@spec concat(t(), t()) :: t()

css(selector)

@spec css(nil | String.t() | [String.t()]) :: t()

has(left, right)

@spec has(t(), t()) :: t()

label(label, opts \\ [])

@spec label(String.t(), exact_opts()) :: t()

link(text, opts \\ [])

@spec link(String.t(), exact_opts()) :: t()

none()

@spec none() :: t()

role(role, text, opts \\ [])

@spec role(String.t(), String.t(), exact_opts()) :: t()

text(text, opts \\ [])

@spec text(String.t(), exact_opts()) :: t()

value(value)

@spec value(nil | any()) :: t()