Browser Automation

Write JavaScript here to open, read, click, type in and screenshot your other tabs, through a browser extension you install and approve.

Desktop Chrome or Edge only. The extension is loaded unpacked (Developer mode) and asks you to approve each tab that connects.
Checking for the extension…
Download extension (v0.1.0, .zip)
Script Sign in to save named scripts. Your draft is kept in this browser.
Name
Output
Script API reference
Tabs
await tabs.open(url, { active }) → tab (waits for it to load)
await tabs.list() → every tab
await tabs.find(match) → first tab whose URL or title matches a string or RegExp
await tabs.get(id)
tab.id, tab.url, tab.title (as of the last call)
await tab.goto(url) / reload() / back() / activate() / close()
Reading
await tab.text(sel) / texts(sel) / html(sel) / value(sel)
await tab.attr(sel, name) / attrs(sel, name)
await tab.count(sel) / exists(sel)
await tab.links(sel?) → [{ text, href }]
await tab.table(sel) → rows (objects keyed by the header row)
await tab.eval(fn, ...args) → runs fn in the page, returns its (JSON) result
await tab.waitFor(sel, { state, timeout }) state: visible | attached | detached | enabled
Acting
await tab.click(sel, { trusted })
await tab.fill(sel, value) (inputs, textareas, selects, checkboxes)
await tab.type(sel, text, { trusted }) appends text
await tab.press('Enter' | 'Ctrl+A' | 'Tab Tab', sel?) (always trusted)
await tab.screenshot({ fullPage }) → Blob (shown below)
await tab.pdf({ landscape }) → Blob
Output and helpers
log(...values), table(rows), show(blob), download(name, data)
await sleep(ms), stopped(); return a value to print it
Selectors
CSS (also inside shadow DOM), text=Sign in, label=Email, xpath=//h1
Actions wait up to 10 seconds ({ timeout } changes it) for the element to be visible and enabled. trusted: true clicks and types through Chrome's debugger, so the page sees real user input; that, screenshots, PDFs and (without user scripts) eval show Chrome's debugging bar while they run.