Advertisement
Getting Started
PBX Browser Automation lets you build browser tasks by arranging commands in a visual Script Builder. You do not need to write the internal automation engine code yourself.
1. Build
Create a script and add the commands you need.
2. Configure
Fill the fields shown for each command.
3. Test
Test important commands before building a larger workflow.
4. Run
Start the finished automation from the Automation interface.
Test Commands Before Building the Full Script
Use the Interactive Command Test Lab to test selectors, values, variables, flow control and HTTP requests before adding the same logic to your final automation.
Create a Script
- Open Script Builder.
- Create a new automation script.
- Add the commands required for your task.
- Fill the required fields.
- Arrange the commands in execution order.
- Test the important commands.
- Start the automation from the Automation interface.
In simple terms: open the website, wait for loading, wait for the target element, then read its text.
Import a Script
- Open the Automation interface.
- Choose Import.
- Select the supported script package.
- Review the installed script before running it.
Import
login-flow.pbx,
review its commands and settings, then enable
it when you are ready to test it.
Export a Script
Export an installed automation when you want a backup, transfer the script to another installation, or share the script package.
- Open the Automation interface.
- Find the script.
- Select Export.
- Save the generated package.
Marketplace
Automation scripts can also be installed through the PBX Browser marketplace.
- Open the marketplace.
- Find the required automation.
- Download the script package.
- Install/import it in PBX Browser.
- Review its configuration.
- Enable and run it.
Script Builder & Command Editor
The Script Builder is the visual editor where commands are added, configured and arranged.
Add
Choose a command from the command picker.
Edit
Change the fields shown by that command.
Order
Commands execute in the order defined by the script.
Flow
Conditions, loops and functions control how commands are reached and repeated.
Add a Command
- Open the script in Script Builder.
- Select Add Command.
- Search for the command or browse its category.
- Select the command.
- Fill the required fields.
- Configure optional fields when needed.
- Place the command in the correct execution position.
Add Wait For Element.
Selector:
#login
Timeout:
30000
milliseconds.
The automation waits until the element appears or the timeout is reached.
Delete a Command
- Select the command.
- Use the delete/remove control.
- Check the surrounding flow after deleting it.
Command Fields
| Field | Meaning | Example |
|---|---|---|
| Selector | CSS selector identifying a webpage element. |
#login
|
| URL | Destination webpage or network endpoint. |
https://example.com
|
| Text | Text entered into an element or keyboard path. |
Hello
|
| Value | Command-specific value. |
premium
|
| Timeout | Maximum wait time for commands that support it. |
30000 ms
|
| Variable | Optional destination for useful result data when result capture is supported. |
accountName
|
| Condition | Rule used by conditional commands. |
${status} == ready
|
| Function Name | Name of a reusable function. |
login
|
| Script Name | Name of another automation used by Connect Script. |
login_helper
|
Variables & Results
Commands can finish with a runtime result. When the result contains useful information, the command can expose that information for later automation steps when result capture is supported.
Result Variable
Stores useful data returned by a command.
Example:
Get Text
→
username
Set Variable
Creates or updates the variable itself. It does not need a generic result-variable field.
Example:
server_url
=
https://example.com/api
Command-Specific Results
Result data can be text, Boolean, structured data or another value defined by the command.
Add Get Text.
Selector:
.account-name
Variable:
accountName
The saved value can be used later wherever variable resolution is supported.
Advertisement
Script Manifest
The manifest contains script-level information and configuration used by the automation runtime.
What it can control
- Script-level configuration.
- Developer information.
- Login/authentication configuration.
- Information used by the script session.
Script Login & Signup
Login is handled by the automation runtime when authentication is required. It is not a normal browser command.
Login Required
The runtime can pause normal execution while login information is presented.
Login Success
The automation can continue after successful authentication.
Login Failure
Failure information can contain a message and related error details.
Script Sessions
A main automation script owns its runtime session. Connected scripts use the active main-script session.
Connected Scripts
Connect Script lets one automation
reuse another automation script.
Create a reusable script named
login_helper.
In another automation, add
Connect Script
and select
login_helper.
The connected script runs as part of the current workflow.
Automation Runtime Lifecycle
You normally do not need to manage these internal steps. This simplified view explains what happens when an automation starts.
AutomationResult state.
Automation Results
The current runtime uses a result model with Success, Failure and Running states.
| State | Meaning | Typical data |
|---|---|---|
| Success | The command completed successfully. | String, Boolean, structured object/map, or command-specific data. |
| Failure | The command could not complete successfully. | Message and optional cause. |
| Running | Execution is still active. | No final result yet. |
A navigation command can finish with a Success result and command-specific data.
If navigation fails or times out, the runtime returns Failure with an explanation.
Loop Runtime
Loop Start and Loop End define a repeatable block. The commands between them are executed according to the configured loop count.
Touch Events Commands
Touch Element Touch Events
Performs a native Android touch on a selected webpage element.
Fields:
Selector: #submit
Timeout: 30000 ms (optional)
Use #submit when you want to test a native touch on the page's Submit button.
Result: Native touch execution data when provided by the current implementation.
Swipe Up Touch Events
Performs a native upward swipe.
Fields: Duration: optional, default 400 ms
Use Swipe Up to move down a long webpage before checking another element.
Result: Swipe execution status.
Swipe Down Touch Events
Performs a native downward swipe.
Fields: Duration: optional, default 400 ms
Use Swipe Down to return toward the top of a webpage.
Result: Swipe execution status.
Swipe Left Touch Events
Performs a native left swipe.
Fields: Duration: optional, default 400 ms
Use Swipe Left on a horizontally scrollable area.
Result: Swipe execution status.
Swipe Right Touch Events
Performs a native right swipe.
Fields: Duration: optional, default 400 ms
Use Swipe Right on a horizontally scrollable area.
Result: Swipe execution status.
Interaction Commands
Click Interaction
Clicks a webpage element.
Fields:
Selector: required
Timeout: optional, default 30000 ms
Selector: #login-button
Result: Success/failure. Return data type: true, false, no_element
Type Interaction
Types text into a selected webpage element.
Fields:
Selector: required
Text: required
Timeout: optional
Selector: input[name="email"]
Text: user@example.com
Result: Typing success/failure. Return data type: true, false, no_element
Clear Interaction
Clears the value from an input element.
Fields: Selector: required
Selector: #search
Result: Success/failure. Return data type: true, false, no_element
Focus Interaction
Places focus on a webpage element.
Fields: Selector: required
Selector: input[name="email"]
Result: Success/failure. Return data type: true, false, no_element
Keyboard Type Interaction
Sends text through the Android keyboard input path.
Fields: Text: required
Text: Hello PBX Browser
Result: Typed text/status result. Return data type: true, false, no_element
Key Press Interaction
Presses a supported keyboard key or key combination.
Fields: Key: required
Try ENTER, TAB, ESC or CTRL+A.
Result: Key press success/failure. Return data type: true, false, no_element
Double Click Interaction
Performs two clicks on an element.
Fields:
Selector: required
Interval: optional, default 100 ms
Selector: .file-row
Result: Success/failure. Return data type: true, false, no_element
Long Press Interaction
Presses and holds an element for the configured duration.
Fields:
Selector: required
Duration: optional, default 1000 ms
Selector: .menu-item
Duration: 1000 ms
Result: Success/failure. Return data type: true, false, no_element
Right Click Interaction
Performs a right-click interaction on an element.
Fields: Selector: required
Selector: .context-menu-target
Result: Interaction success/failure. Return data type: true, false, no_element
Hover Interaction
Moves the pointer over an element.
Fields: Selector: required
Selector: .products-menu
Result: Success/failure. Return data type: true, false, no_element
Drag Interaction
Drags one webpage element toward another element.
Fields:
Source Selector: required
Target Selector: required
Source: .card
Target: .drop-zone
Result: Success/failure. Return data type: true, false, no_element
Scroll Interaction
Scrolls the page or a selected scrollable element.
Fields:
Selector: optional
X: optional, default 0
Y: optional, current default 500
Page scroll: X 0, Y 600.
Result: Scroll success/failure. Return data type: true, false, no_element
Select Interaction
Selects an option from an HTML select control.
Fields:
Selector: required
Value: required
Selector: #country
Value: india
Result: Selected value/status result. Return data type: true, false, no_element, no_value
Elements Commands
Find Element Elements
Searches for an element using a CSS selector.
Fields:
Selector: required
Timeout: optional, default 30000 ms
Selector: #login-button
Result: Success when found; Failure when not found.
Exists Elements
Checks whether an element exists in the page DOM.
Fields:
Selector: required
Timeout: optional
Variable: optional result capture
Selector: .success-message
Variable: successExists
Result: Boolean/result data depending on the command result.
Is Visible Elements
Checks whether an element exists and is visible in the current viewport.
Fields:
Selector: required
Timeout: optional
Variable: optional result capture
Selector: #submit
Variable: submitVisible
Result: Visibility result/status.
Get Element Location Elements
Reads the selected element's position and size.
Fields: Selector: required
Selector: .product-card
Result: Structured location data can include position, size, center values and device-pixel-ratio information.
Scroll Into View Elements
Scrolls a selected element into the visible viewport.
Fields:
Selector: required
Center: optional
Selector: #checkout
Center: enabled
Result: Success/failure.
Wait For Element Elements
Waits until an element appears in the page DOM.
Fields:
Selector: required
Timeout: optional, default 30000 ms
Interval: optional, default 250 ms
Selector: #dashboard
Timeout: 30000 ms
Result: Success when found; Failure after timeout.
Get Text Elements
Reads text from a selected element.
Fields:
Selector: required
Variable: optional result capture
Selector: .account-name
Variable: accountName
Result: Text string.
Get HTML Elements
Returns the selected element's HTML.
Fields:
Selector: required
Variable: optional result capture
Selector: #profile
Variable: profileHtml
Result: HTML string.
Get Attribute Elements
Reads an attribute from an element.
Fields:
Selector: required
Attribute Name: required
Variable: optional
Selector: a.download
Name: href
Variable: downloadUrl
Result: Attribute value or nullable value.
Set Attribute Elements
Changes an attribute on the selected element.
Fields:
Selector: required
Attribute Name: required
Value: required
Selector: #button
Name: data-state
Value: ready
Result: Success/failure.
JavaScript Commands
Execute JavaScript JavaScript
Executes JavaScript in the current webpage.
Fields: JavaScript: required
Try document.title or document.querySelector("#status")?.innerText.
Result: The value returned by the JavaScript expression, when one is returned.
Dispatch JavaScript Event JavaScript
Sends a JavaScript event to a selected element.
Fields:
Selector: required
Event: required
Selector: #email
Event: input
Result: Event dispatch success/failure.
Control Commands
Sleep Control
Pauses automation for a specified duration.
Fields: Duration: required, milliseconds
Duration 1000 = 1 second.5 * 1000 = 5 seconds.
Result: Sleep completed.
Set Variable Control
Creates or updates an automation variable.
Fields:
Variable Name: required
Value: optional
Variable Name: server_url
Value: https://example.com/api
Result: The command defines the variable itself; it does not need a generic result-variable field.
Wait Page Load Control
Waits for the current page to report that it has completely loaded.
Fields: Timeout: optional, default 30000 ms
Navigate to a page, then use Wait Page Load before reading important page content.
Result: Success when complete; Failure on timeout/evaluation error.
Network Commands
HTTP Request Network
Sends an HTTP request from the automation runtime.
Fields:
Method: required
URL: required
Action: required
Data: optional
Headers: optional
Method: POST
URL: https://example.com/api.php
Action: task_request
Result: HTTP response data/status exposed by the current command implementation.
Report Network
Sends a report to a configured endpoint.
Fields:
URL: required
Action: required
Data: optional
Headers: optional
URL: https://example.com/report.php
Action: automation_complete
Result: Report execution success/failure.
Script Commands
Connect Script Script
Runs another automation script as part of the current workflow.
Fields: Script Name: required
Script Name: login_helper
Result: Structured information from the connected script when exposed by the runtime.
Conditions Commands
If Conditions
Starts a conditional block.
Fields: Condition: required
Condition: ${login_found} == true
Result: Control-flow result; not normal result data.
Else If Conditions
Adds another condition to the active conditional block.
Fields: Condition: required
Check another status when the first condition is false.
Result: Control-flow result.
Else Conditions
Defines the fallback branch of an If block.
Fields: No fields.
If login succeeds use the success branch; otherwise use Else for the failure path.
Result: Control-flow result.
End If Conditions
Closes the active conditional block.
Fields: No fields.
Place End If after the final branch commands.
Result: Control-flow marker.
Loops Commands
Loop Start Loops
Starts a block that should be repeated.
Fields: Repeat Count: required
Repeat Count: 5
Put the commands to repeat between Loop Start and Loop End.
Result: Control-flow result.
Loop End Loops
Closes the active loop block.
Fields: No fields.
Place Loop End after the last command that should repeat.
Result: Control-flow result.
Functions Commands
Function Start Functions
Starts a reusable function definition.
Fields: Function Name: required
Function Name: login
Result: Function control result.
Function End Functions
Closes a function definition.
Fields: No fields.
Place Function End after the final command inside the function.
Result: Function control result.
Call Function Functions
Executes an existing reusable function.
Fields: Function Name: required
Function Name: login
Result: Function execution result/status.