Skip to main content

Submitting forms

BrowserQL can easily handle clicking, typing, scrolling, and solving CAPTCHAs. All you need to provide are the selectors and inputs.

Here is an example form fill:

mutation SubmitForm {
goto(url: "https://example.com/form", waitUntil: firstContentfulPaint) {
status
}

fillName: type(
selector: "input#name"
text: "John Doe"
) {
time
}

fillEmail: type(
selector: "input#email"
text: "johndoe@example.com"
) {
time
}

submitForm: click(
selector: "button#submit"
) {
time
}
}

Clicking within Iframes

Deep selectors let you target elements nested inside iframes or hidden within shadow DOMs.

To target an element inside an iframe, use the format:

selector: "< [optional URL pattern] selector"

Examples:

Target an iframe of google.com/api/verify and click an anchor element with a classname that includes now:

selector: "< *google.com/api/verify* a[class*='now']"

Solving and Verifying CAPTCHAs

BrowserQL includes built-in support for CAPTCHA challenges. BQL will automatically detect and interact with CAPTCHAs, even those embedded in iframes or shadow DOMs.

Verify

The verify mutation clicks a verification button to assert human-like interaction. This can be used to surpass Cloudflare's human verification step.

mutation Verify {
goto(url: "https://protected.domain") {
status
}
verify(type: cloudflare) {
found
solved
time
}
}

Solve

The solve mutation solves a CAPTCHA, specified by the type of CAPTCHA to solve. Currently, BQL can solve both hCaptcha and reCAPTCHA.

mutation SolveCaptcha {
goto(url: "https://protected.domain") {
status
}
solve(type: hcaptcha) {
found
solved
time
}
}

Enabling User Input

Hybrid automations with liveURL allow users to interact with automated workflows.