Skip to main content

select

Selects a value from a dropdown or multiple select element

Example:

mutation Select {
goto(url: "https://example.com") {
status
}

single: select(
selector: "select"
value: "option1"
) {
time
}

multi: select(
selector: "select"
value: ["option1", "option2"]
) {
time
}
}
select(
timeout: Float
scroll: Boolean = true
selector: String!
value: StringOrArray!
visible: Boolean = false
wait: Boolean = true
): SelectResponse

Arguments

select.timeout ● Float scalar

How long to wait for the element to appear before timing out on the handler, overriding any defaults. Default timeout is 30 seconds, or 30000.

select.scroll ● Boolean scalar

Whether or not to scroll to the select element prior to selecting, defaults to true

select.selector ● String! non-null scalar

The CSS selector of the element on the page you want to select a value from

select.value ● StringOrArray! non-null scalar

The value or values to select from the dropdown or multiple select element

select.visible ● Boolean scalar

Whether or not to select the element only if it's visible

select.wait ● Boolean scalar

Whether or not to wait for the select to present in the DOM

Type

SelectResponse object

The response returned after selecting a value from a dropdown or multiple select element