BrowserClipboard from the browser context. Clipboard operations target the active page unless you provide another page.
- TypeScript
- Python
- Go
Quick start
readText()
Read plain text from the browser clipboard.ClipboardOptions
Options that select a target page and configure the operation.
Page
The page to target. Defaults to the active page.
Promise<string>
The clipboard text.
writeText()
Write plain text to the browser clipboard.string
The plain text to write.
ClipboardOptions
Options that select a target page and configure the operation.
Page
The page to target. Defaults to the active page.
Promise<void>
Resolves after the clipboard operation completes.
clear()
Clear the browser clipboard.ClipboardOptions
Options that select a target page and configure the operation.
Page
The page to target. Defaults to the active page.
Promise<void>
Resolves after the clipboard operation completes.
paste()
Paste the clipboard contents into the active element.ClipboardPasteOptions
Promise<void>
Resolves after the clipboard operation completes.
copy()
Copy the current selection to the browser clipboard.ClipboardOptions
Options that select a target page and configure the operation.
Page
The page to target. Defaults to the active page.
Promise<void>
Resolves after the clipboard operation completes.
cut()
Cut the current selection to the browser clipboard.ClipboardOptions
Options that select a target page and configure the operation.
Page
The page to target. Defaults to the active page.
Promise<void>
Resolves after the clipboard operation completes.

