Overview
The "Wait for Selector" operation in the Auto Browser node automates waiting for a specific element to appear on a web page within a browser profile. This is useful in scenarios where subsequent actions depend on the presence of certain elements, such as waiting for a button to load before clicking it or waiting for a form field to become available before typing.
Practical examples include:
- Waiting for a login button to appear after navigating to a login page.
- Pausing workflow execution until a dynamically loaded content section is visible.
- Synchronizing automation steps with page load events or AJAX content updates.
Properties
| Name | Meaning |
|---|---|
| Profile | The browser profile to use. This identifies which browser context/session to operate on. |
| Tab ID | Optional tab identifier to specify which browser tab to target for the action. |
| Selector | CSS selector of the element to wait for (e.g., #buttonId or .className). |
| Timeout | Maximum time in milliseconds to wait for the selector to appear before timing out. |
Output
The output JSON object includes the following fields:
profileId: The browser profile used for the operation.tabId: The tab identifier where the wait occurred.operation: The string"waitForSelector"indicating the performed operation.status: Indicates success with the value"success".
No binary data is output by this operation.
Example output JSON:
{
"profileId": "default",
"tabId": "some-tab-id",
"operation": "waitForSelector",
"status": "success"
}
Dependencies
- Requires an external Auto Browser API service accessible via a server URL configured in the node credentials.
- The node needs an API key credential to authenticate requests to the Auto Browser API.
- The API endpoint
/browser/executeis used to send commands to the browser automation backend.
Troubleshooting
- Timeout errors: If the selector does not appear within the specified timeout, the operation may fail or throw an error. Increase the timeout value if the page loads slowly.
- Invalid selector: Using an incorrect or malformed CSS selector will cause the wait to fail. Verify the selector syntax and ensure the element exists on the page.
- Missing or invalid profile/tab ID: Ensure the specified browser profile and tab ID are valid and active; otherwise, the request to the API may fail.
- API connection issues: Errors related to the server URL or authentication indicate misconfiguration of the API credentials or network problems.
Links and References
- CSS Selectors Reference
- Auto Browser API Documentation (generic link, replace with actual if available)