Browser Activities
Web automation in Genzbots is powered by Playwright and Chrome DevTools Protocol (CDP). There is no separate set of "browser activities" — the same Unified activities (Click, Type Into, Get Text, etc.) that work for desktop also work for web. The difference is the container: wrap web activities inside a Launch Browser container, and Studio automatically routes all child activities through the Playwright/CDP web engine.
Launch Browser (container)
Opens a new Chrome or Edge browser instance and provides the web automation context to all child activities. The browser is closed when the container exits (configurable).
| Parameter | Type | Default | Description |
|---|
| BrowserType | Chrome | Edge | Chrome | Which browser to launch |
| Url | String | — | URL to navigate to immediately after launch |
| Headless | Boolean | false | Run the browser without a visible window |
| Width | Int32 | 1280 | Browser viewport width in pixels |
| Height | Int32 | 800 | Browser viewport height in pixels |
| Close | Boolean | true | Close the browser when the container finishes |
| Body | Activity sequence | — | Web automation activities to run in scope |
| 1 | Launch Browser: |
| 2 | BrowserType: Chrome |
| 3 | Url: "https://portal.example.com" |
| 4 | Headless: false |
| 5 | Body: |
| 6 | Click: Selector: <webctrl tag='BUTTON' innertext='Login'/> |
| 7 | Type Into: Selector: <webctrl id='username'/> Text: "{userName{'}'}" |
| 8 | Type Into: Selector: <webctrl id='password'/> Text: "{password{'}'}" ClearFirst: true |
| 9 | Click: Selector: <webctrl tag='BUTTON' type='submit'/> |
Web Selectors
Inside a Launch Browser context, the Selector Editor generates <webctrl> selector segments targeting DOM elements. Supported attributes include:
| Attribute | Example | Matches |
|---|
| id | id='username' | HTML id attribute |
| tag | tag='BUTTON' | HTML element tag name |
| type | type='submit' | HTML type attribute (inputs, buttons) |
| class | class='btn-primary' | CSS class name (exact match) |
| name | name='email' | HTML name attribute |
| innertext | innertext='Login' | Visible text content of the element |
| css | css='.nav > a:first-child' | Full CSS selector (fallback) |
| playwright | playwright=text=Login | Playwright-native selector expression |
| 1 | <!-- Standard web selector --> |
| 2 | <webctrl tag='INPUT' type='email' name='user_email'/> |
| 3 | |
| 4 | <!-- Playwright text selector (more resilient for dynamic text) --> |
| 5 | <webctrl playwright='text=Submit Order'/> |
| 6 | |
| 7 | <!-- CSS selector for complex DOM structures --> |
| 8 | <webctrl css='table.data-grid tr:nth-child(2) td:first-child'/> |
Attaching to an existing browser
Genzbots can attach to an already-open Chrome/Edge session via CDP auto-discovery. The PlaywrightBrowserService uses 5 strategies in order:
| Strategy | How it works |
|---|
| 1. Specified port | Uses the DebugPort parameter if set (e.g., 9222) |
| 2. WMI scan | Scans running browser processes for --remote-debugging-port argument |
| 3. Common ports | Tries ports 9222, 9229, 9230 in sequence |
| 4. DevToolsActivePort file | Reads Chrome's DevToolsActivePort file from the user-data-dir |
| 5. Extension fallback | Connects via the Genzbots browser extension WebSocket bridge |
Attach modeSet Close: false on the Launch Browser container when attaching to an existing session — this prevents Genzbots from closing a browser the user opened manually.
Unified activities inside Launch Browser
All Unified activities from the UI Automation section are available inside Launch Browser. The engine is resolved from the parent scope automatically:
| Activity | Web behaviour |
|---|
| Click | Playwright locator.click() with auto-scroll and auto-wait |
| Type Into | Playwright locator.fill() or locator.type() |
| Get Text | Returns element.innerText or element.textContent |
| Wait For Element | Playwright waitForSelector with the given State |
| Select Item | Playwright selectOption() on <select> elements |
| Extract Table | Reads all <tr>/<td> cells into a DataTable |
| Take Screenshot | Playwright page.screenshot() |
| Execute JavaScript | Playwright page.evaluate() |
| Navigate To | Playwright page.goto() |
| Hover | Playwright locator.hover() |
| Send Hotkey | Playwright keyboard.press() |