waitForSelector
Waits for a given selector to be present in the DOM, with optional visibility
Example:
mutation WaitForSelector {
goto(url: "https://example.com") {
status
}
waitForSelector(selector: "h1") {
time
}
}
waitForSelector(
selector: String!
timeout: Float
visible: Boolean = false
): WaitForSelector
Arguments
waitForSelector.selector
● String!
non-null scalar
The selector to wait for until present in the DOM
waitForSelector.timeout
● Float
scalar
When waiting for a selector applies a timeout to wait for in milliseconds, overriding any defaults. Default timeout is 30 seconds, or 30000.
waitForSelector.visible
● Boolean
scalar
Whether or not to consider the element as present only if it's visible
Type
WaitForSelector
object
Response returned after a particular selector has been found in the DOM