A comprehensive clipboard testing solution for Playwright, providing reliable cross-browser support for clipboard operations.
β¨ Key Features
- Cross-browser clipboard operations (Chromium, Firefox, WebKit)
- Rich text operations with HTML preservation
- Text selection with character and word-level control
- Clipboard content management with direct access
- TypeScript support with full type definitions
π§ Technical Details
-
Browser-specific optimizations:
- Native Clipboard API for Chromium
- Keyboard shortcuts fallback for Firefox
- Hybrid approach for WebKit
-
Fallback mechanisms:
- Automatic fallback to keyboard shortcuts when needed
- ContentEditable elements for rich text operations
- Range and Selection APIs for text manipulation
π Requirements
- Node.js >= 20.0.0
- Playwright >= 1.49.0
- TypeScript >= 5.3.0 (for TypeScript users)
π Browser Support Matrix
Feature | Chromium | Firefox | WebKit |
---|---|---|---|
Basic Operations | β | β | β |
Rich Text | β | β | β |
Word Operations | β | β | β |
Text Selection | β | β | β |
π¦ Installation
npm install --save-dev playwright-clipboard