How to Automate UIs
For activities such as submitting forms or inputting data, Browseless recommends using BrowserQL, our most advanced option. BQL is our own custom library that avoids the fingerprints left by other automation tools.
In this section you'll go through the following:
- How BrowserQL works
- Bypassing bot detectors
- Parsing data
- Generating API requests
- Connecting libraries
How BrowserQL Works
BrowserQL is our own browser automation language, built on GraphQL. We’ve tried to keep it simple, as just a set of queries and responses.
It’s optimized for web automation and scraping, designed to minimize complexity by making intelligent assumptions. Here’s what it does for you:
- Waits for selectors before interacting with elements.
- Handles mouse movements and clicks automatically.
- Ensures elements are visible by scrolling if needed.
- Manages page-load events, like waiting for
firstContentfulPaint
.
Instead of worrying about these technical details, you focus on queries and actions. You will:
- Navigate to pages.
- Perform actions (e.g., click, type).
- Solve or verify CAPTCHAs.
- Connect to a library if needed.
Each query follows the format of function (arguments) {responses}
with an optional name:
beforehand. For example, going to a site and start filling a form by typing your email, would look like:
mutation form_example {
goto(url: "https://example.com", waitUntil: networkIdle) {
status
}
typeEmail: type(text: "john@email.com", selector: "#Email"
) {
time
}
}
We then run this query with the browsers hosted in our cloud, which you can see run in the editor.
