Skip to main content

type

Types text into an element by scrolling to it, clicking it, then emitting key events for every character

Example:

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

type(
text: "Hello, World!"
selector: "input[type='text']"
) {
time
}
}
type(
text: String!
selector: String!
delay: [Int] = [50, 200]
interactable: Boolean = true
scroll: Boolean = true
timeout: Float
visible: Boolean = false
wait: Boolean = true
): TypeResponse

Arguments

type.text ● String! non-null scalar

The text content you want to type into the element

type.selector ● String! non-null scalar

The CSS selector of the element on the page you want to type text into

type.delay ● [Int] list scalar

The amount of delay between keystrokes in milliseconds. Values are used as a range and chosen at random

type.interactable ● Boolean scalar

Whether or not to check if element can be interacted with by hovering over it and seeing if the element is available at that x and y position

type.scroll ● Boolean scalar

Whether or not to scroll to the element prior to typing, defaults to true

type.timeout ● Float scalar

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

type.visible ● Boolean scalar

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

type.wait ● Boolean scalar

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

Type

TypeResponse object

Response returned after having typed into an element