Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:A9T9 RPA Chromium Browser Environment

From Leeroopedia
Knowledge Sources
Domains Browser_Automation, RPA
Last Updated 2026-10-22 17:48 GMT

Overview

Chromium-based browser (Chrome/Edge) running the Ui.Vision MV3 extension with debugger (CDP), captureVisibleTab, native messaging, and side panel support.

Description

This environment provides a Chromium-based browser context for the Ui.Vision RPA extension. It is built on the Manifest V3 (MV3) extension architecture with a background service worker, content scripts injected at document_start, a side panel, and full access to the Chrome DevTools Protocol (CDP) via the debugger permission. The extension uses chrome.tabs.captureVisibleTab for screenshots, chrome.debugger for trusted input (CDP), and chrome.runtime.connectNative for desktop automation via the XModule2 native messaging host.

Usage

Use this environment for all browser-scope RPA workflows: macro recording/playback, JS script macro execution, image search (vision), OCR text recognition, and the AI macro agent. The uiv.browser.* API tier (trusted CDP input) is only available in this environment — Firefox has no debugger API.

System Requirements

Category Requirement Notes
OS Windows, macOS, or Linux Chrome/Edge runs on all three
Browser Google Chrome or Microsoft Edge Manifest V3 required; Chrome 100+ recommended for native messaging SW keep-alive
Disk Minimal Extension storage uses browser IndexedDB / File System Access API
Hardware Standard desktop GPU not required; screen capture uses browser API

Dependencies

System Packages

  • Google Chrome or Microsoft Edge browser

Extension Permissions (manifest.json)

  • debugger — Chrome DevTools Protocol for trusted input
  • tabs, activeTab — tab management and screenshot capture
  • nativeMessaging — connect to XModule2 desktop automation host
  • storage, storage.session — persistent and session-scoped data
  • sidePanel — side panel UI
  • scripting — executeScript for content script injection
  • proxy, webRequest, webRequestAuthProvider — proxy and auth
  • cookies, bookmarks, clipboardRead, clipboardWrite
  • downloads, downloads.ui
  • contextMenus, notifications
  • Host permissions: <all_urls>

CSP

  • script-src 'self' 'wasm-unsafe-eval' — WASM image search engines require wasm-unsafe-eval

Key NPM Dependencies

  • react >= 18.2.0
  • antd >= 5.14.2
  • @anthropic-ai/sdk >= 0.65.0
  • tesseract.js >= 5.1.0
  • @babel/standalone >= 8.0.4

Credentials

The following environment variables / API keys may be required depending on features used:

  • ANTHROPIC_API_KEY — Anthropic Claude API key (for AI macro agent / computer use)
  • OCR_SPACE_API_KEY — OCR.Space cloud API key (for cloud OCR engine)
  • OPENROUTER_API_KEY — OpenRouter API key (for OpenAI-compatible AI providers)

Quick Install

# Build the Chrome extension from source
npm install
npm run build  # produces dist/ for Chrome

# Load in Chrome: chrome://extensions > Developer mode > Load unpacked > select dist/

Code Evidence

MV3 manifest with service worker and debugger permission from extension/manifest.json:1-76:

{
  "manifest_version": 3,
  "background": { "service_worker": "background.js" },
  "permissions": ["debugger", "tabs", "nativeMessaging", "sidePanel", "scripting", ...],
  "content_security_policy": {
    "extension_pages": "script-src 'self' 'wasm-unsafe-eval';"
  }
}

Chrome/Firefox API adapter from src/common/web_extension.js:123-129:

var Ext = typeof chrome !== 'undefined' ? adaptChrome(UsedAPI, chrome) : browser

Object.assign(Ext, {
  isFirefox: () => {
    return /Firefox/.test(self.navigator.userAgent)
  }
})

Linux screenshot delay workaround from src/common/constant.ts:45:

export const SCREENSHOT_DELAY = /Linux/i.test(self.navigator.userAgent) ? 200 : 0

Common Errors

Error Message Cause Solution
MAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND More than 2 captureVisibleTab calls/sec The shared throttle in CaptureScreenshotService handles this automatically; ensure all instances use the shared service
Native host not found XModule2 not installed or not registered Install the Desktop Automation app and fully restart the browser
wasm-unsafe-eval CSP violation CSP does not allow WASM Ensure manifest CSP includes 'wasm-unsafe-eval'
debugger attach failed Another debugger already attached Only one debugger can attach at a time; close DevTools or other CDP clients

Compatibility Notes

  • Chrome 100+: Native messaging port keeps the service worker alive (MV3 SW lifecycle). Older Chrome versions may terminate the SW, breaking native messaging.
  • Edge: Fully compatible — same Chromium extension API surface. Native messaging host registration identical to Chrome.
  • Linux: Requires a 200ms screenshot delay after tab activation (Ubuntu-specific captureVisibleTab timing issue).
  • Side Panel: Requires Chrome 114+ (sidePanel API).

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment