Copy and paste feels like one of the simplest interactions in software.

Click:

Copy

Then:

Paste

Done.

But modern web applications make clipboard behavior much more complicated than it appears.

A copy action can involve:

- plain text
- rich text
- HTML
- images
- files
- formatted tables
- links
- selected content
- browser permissions
- secure contexts
- user gestures
- keyboard shortcuts
- application-specific paste handling
- browser-specific behavior
- fallback APIs

A button can even display:

Copied!

while nothing useful actually reached the clipboard.

That creates an important QA distinction:

Testing the copy button is not the same as testing the clipboard.

A strong test needs to verify what was actually copied, what happens when it is pasted, what formatting survives, and how the application behaves when the browser blocks or limits clipboard access.

Modern browser clipboard APIs are also security-sensitive. Browser behavior can depend on secure context, permissions, user activation, browser engine, and the type of clipboard operation being attempted. :contentReference[oaicite:0]{index=0}

This makes clipboard testing a useful example of a broader QA principle:

When an application depends on a browser capability, test the browser boundary as well as the application code.

---

What Is Clipboard Testing?

Clipboard testing verifies that an application correctly handles copying, cutting, pasting, reading, writing, and transforming clipboard content.

Depending on the product, this can include:

- Copy
- Paste
- Cut
- Keyboard shortcuts
- Context-menu actions
- Programmatic clipboard access
- Plain text
- Rich text
- HTML
- Images
- Files
- Tables
- URLs
- Multiline content
- Unicode
- Special characters
- Browser permissions
- Fallback behavior

A basic clipboard workflow might look like:

User selects content
↓
User clicks Copy
↓
Application writes clipboard
↓
User opens destination
↓
User pastes
↓
Destination receives content

The test should validate the complete flow.

Not just the toast message.

---

Why Clipboard Testing Is Different

Clipboard functionality crosses several boundaries.

You have:

Application
↓
Browser
↓
Clipboard API
↓
Operating System
↓
Destination Application

Your application controls only part of this chain.

The browser may impose restrictions.

The operating system controls the actual clipboard.

The destination application may interpret the copied content differently.

This means clipboard bugs can appear only in certain:

- browsers
- operating systems
- security contexts
- user interaction patterns
- content types
- automation environments

A test that passes in Chrome on one machine does not automatically prove that the clipboard workflow works everywhere.

---

Test the Actual Clipboard, Not Just the UI

Consider a button:

[ Copy ]

The user clicks it.

The application displays:

Copied!

A weak test might assert:

"Copied!" is visible

That proves only that the application displayed a message.

It doesn't prove that:

- the clipboard was updated
- the correct text was copied
- formatting was preserved
- the clipboard operation succeeded
- the pasted content is correct

A stronger test is:

Click Copy
↓
Read or paste clipboard content
↓
Compare with expected content

The actual clipboard result is the important assertion.

---

Test Basic Text Copy

Start with simple content.

Example:

Hello World

Copy it.

Then paste it into:

- a text input
- a textarea
- a text editor
- another supported destination

Expected:

Hello World

Then test progressively more complex values.

For example:

Hello World 123

Hello
World

Hello, "World"

Hello — World

你好

नमस्ते

ਪੰਜਾਬੀ

The purpose is to identify encoding and formatting problems that simple English text will not expose.

---

Test Multiline Text

Multiline content is a common source of subtle clipboard defects.

Copy:

Line 1
Line 2
Line 3

Paste it.

Verify:

- line breaks
- ordering
- whitespace
- blank lines
- indentation

Also test:

Line 1

Line 3

where an intentional blank line exists.

A system that normalizes whitespace incorrectly can silently change user content.

---

Test Leading and Trailing Whitespace

Test:

" Hello World"

and:

"Hello World "

and:

" Hello World "

Also test:

"\nHello World"

and:

"Hello World\n"

Some applications intentionally trim whitespace.

Others must preserve it.

QA should follow the product contract rather than assuming trimming is always correct.

---

Test Tabs and Indentation

For developer tools, editors, data applications, and documentation products, clipboard content may contain tabs.

Example:

Name Email Status

Verify whether tabs are preserved.

Also test:

- spaces
- tabs
- mixed indentation
- multiple spaces
- code blocks
- aligned text

This is particularly important for applications where users copy code, configuration, SQL, JSON, or tabular data.

---

Test Unicode

Clipboard testing should include Unicode.

Test:

- accented characters
- Asian scripts
- Indic scripts
- Arabic
- emoji
- symbols
- mathematical characters

For example:

Café

北京

नमस्ते

ਪੰਜਾਬੀ

مرحبا

😀 🚀 ✓

Verify that:

- characters are not corrupted
- encoding remains correct
- pasted text matches the original
- normalization does not unexpectedly change content

This is especially important for international applications.

---

Test Special Characters

Test characters that may have special meaning in HTML, JSON, SQL, or application logic.

Examples:

< > & " '

Also test:

&
<
>
"
'
\

The clipboard should preserve the actual content unless the application intentionally transforms it.

A common defect occurs when copied text passes through HTML rendering and gets escaped or decoded incorrectly.

---

Test Rich Text Copy

Modern editors often allow users to copy formatted content.

For example:

Bold text

Italic text

- List item
- List item

A rich-text copy operation may place multiple representations into the clipboard, such as:

- plain text
- HTML

The destination application may choose which representation to use.

Test pasting into:

- plain text input
- rich-text editor
- document editor
- supported application areas

Verify whether formatting is preserved according to the product's requirements.

---

Test Plain Text vs Rich Text

A particularly useful test is to paste the same copied content into two destinations.

Destination A

Plain textarea.

Expected:

Bold text

rather than HTML markup.

Destination B

Rich-text editor.

Expected:

Bold text

with formatting preserved if supported.

The same clipboard payload can therefore produce different destination behavior.

QA should test the intended behavior for both.

---

Test HTML Content

For applications that copy HTML content, test:

- headings
- paragraphs
- links
- lists
- tables
- bold text
- italic text
- inline formatting

Also verify that unsafe content does not become an injection vector when pasted.

For example, if users copy content from one editor and paste it into another, the application should sanitize content according to its security model.

Clipboard testing can therefore overlap with security testing.

---

Test Links

Copy:

https://example.com

Paste it into:

- plain text
- rich-text editor
- URL field
- supported document editor

Verify:

- visible text
- actual link target
- protocol
- query parameters
- fragments

Also test formatted links where the displayed text differs from the target URL.

For example:

RoboQA

with an underlying link.

The copied result should follow the product's expected behavior.

---

Test Tables

Tables are particularly useful clipboard test cases.

Copy:

| Name | Status | Score |
|---|---|---:|
| Alice | Active | 95 |
| Bob | Pending | 72 |

Then paste into:

- spreadsheet
- text editor
- rich-text editor
- application import field

Verify:

- columns
- rows
- cell boundaries
- values
- headers
- formatting

A table that looks correct visually may lose its structure when copied.

---

Test Images

If the product supports copying images, test:

- PNG
- JPEG
- screenshots
- transparent images
- large images
- small images

Verify:

- image type
- dimensions
- content
- transparency
- destination behavior

Do not assume image copy behaves exactly like text copy.

Clipboard systems can expose different representations for different data types.

---

Test Copying Files

Some applications allow users to copy files or file-like objects.

If supported, test:

- single file
- multiple files
- small file
- large file
- unsupported file type
- renamed file
- duplicate filename

Verify:

- file exists
- filename is correct
- content is correct
- MIME type is correct
- file size is correct

This should be treated separately from ordinary text clipboard testing.

---

Test Cut Operations

Cut is not simply copy.

A typical cut operation should:

1. Copy selected content.
2. Remove it from the source.
3. Allow the content to be pasted elsewhere.

Test:

Select text
↓
Cut
↓
Source loses text
↓
Paste
↓
Destination receives text

Also test failure scenarios.

If the clipboard operation fails, the application should not accidentally delete content from the source.

This is especially important for editors.

---

Test Keyboard Shortcuts

Users don't always click Copy.

Test:

- Ctrl+C
- Cmd+C
- Ctrl+X
- Cmd+X
- Ctrl+V
- Cmd+V

depending on supported platforms.

Also test:

- focus state
- selected text
- input fields
- editors
- tables
- custom components

A custom application may accidentally intercept keyboard shortcuts and break normal browser behavior.

---

Test Context Menu Actions

If supported, test:

Right click
↓
Copy

and:

Right click
↓
Paste

Also verify behavior when the application:

- disables the context menu
- provides a custom context menu
- uses contenteditable elements
- uses custom editors

The browser's native behavior and application behavior can interact in unexpected ways.

---

Test Copy Button With No Selection

What happens when the user clicks Copy without selecting anything?

Possible behavior:

- button disabled
- nothing happens
- default content is copied
- error message appears

The expected behavior should be defined.

Test:

Empty selection
↓
Copy

and:

Selection exists
↓
Copy

Do not assume the browser will handle the application logic automatically.

---

Test Partial Selection

If the application supports selecting text, test:

- first character
- last character
- one word
- multiple words
- entire sentence
- entire paragraph
- entire document
- selection across lines

Verify exactly what gets copied.

Selection bugs can be especially difficult to notice when the selected content is large.

---

Test Selection Across Components

Some editors contain:

- text
- links
- images
- embedded elements
- formatted blocks

Test selecting content across multiple element types.

For example:

Heading
↓
Paragraph
↓
Link
↓
List

Copy the whole selection.

Verify the resulting clipboard content.

---

Test Browser Permission Behavior

Modern browser clipboard APIs are permission-sensitive.

A browser may allow writing in situations where reading requires stronger permission or user interaction.

Clipboard operations can also depend on secure contexts and user activation. :contentReference[oaicite:1]{index=1}

QA should therefore test:

- permission granted
- permission denied
- permission unavailable
- permission prompt
- no user gesture
- user gesture present
- HTTPS
- HTTP where applicable
- localhost

Do not treat every permission failure as an application defect.

The test should distinguish:

Browser policy

from:

Application behavior.

---

Test User Gesture Requirements

Some clipboard operations require a real user interaction.

For example:

User clicks Copy
↓
Clipboard write

may succeed.

But:

Page loads
↓
Script automatically writes clipboard

may be blocked.

Test both where relevant.

This matters because an implementation can work during manual clicking but fail when triggered programmatically without the required user activation.

---

Test Secure Context

Clipboard functionality can behave differently depending on whether the application is running in a secure context.

Test the application under the environments it actually supports.

For example:

HTTPS
localhost
HTTP if intentionally supported

A feature that works on localhost during development may fail when deployed under a different environment or security configuration.

Environment should therefore be part of clipboard test coverage.

---

Test Browser Differences

Do not assume clipboard behavior is identical across:

- Chromium
- Firefox
- WebKit/Safari

Test supported browsers explicitly.

Look for differences in:

- clipboard permissions
- read access
- write access
- rich text handling
- image handling
- user gesture requirements
- security restrictions

Cross-browser clipboard behavior can expose failures that ordinary DOM-based tests never detect.

---

Test Headed vs Headless Execution

Clipboard tests can behave differently in automation environments.

Compare:

Headed browser

with:

Headless browser

where your automation stack supports both.

Also test:

- local developer machine
- CI runner
- containerized environment

A clipboard feature that works manually but fails in CI may indicate an environment or browser capability issue rather than a product defect.

---

Test Clipboard Fallbacks

Applications may implement a modern Clipboard API path plus an older fallback.

For example:

Modern Clipboard API
↓
succeeds

or:

Modern API unavailable/fails
↓
fallback mechanism

QA should deliberately force the modern path to fail and verify the fallback.

This is important because fallback code is often rarely executed during normal development.

Some current clipboard testing guidance specifically recommends testing fallback behavior when the modern API is unavailable, blocked, or gated by browser policy. :contentReference[oaicite:2]{index=2}

---

Test What Happens When Clipboard Access Is Blocked

Force clipboard access to fail.

Then click Copy.

What should happen?

Possible behavior:

Copy failed

or:

Use keyboard shortcut to copy

or:

Nothing happens

The important thing is that the UI should not falsely report:

Copied successfully

when the browser rejected the operation.

A misleading success message is a real functional defect.

---

Test Clipboard Failure Without Data Loss

This is particularly important for cut and paste workflows.

Suppose:

User selects content
↓
Cut
↓
Clipboard write fails

The application should not unexpectedly delete the selected content if the product requires successful clipboard transfer before removal.

Test failure paths carefully around destructive clipboard operations.

---

Test Paste Into Inputs

Test clipboard content against:

- text input
- password input where applicable
- textarea
- number input
- email input
- date input
- search field

The application may intentionally transform pasted values.

For example:

123 456 789

could become:

123456789

if spaces are not allowed.

Test whether the transformation is intentional.

---

Test Paste Validation

Paste invalid data.

For example:

abc

into a numeric field.

Then test:

123.45

and:

123,45

depending on locale.

Also test:

- whitespace
- special characters
- extremely long values
- Unicode
- line breaks

The application should validate pasted content consistently with typed content where appropriate.

---

Test Paste Into Rich Editors

Rich editors are particularly complex.

Test:

- plain text
- formatted text
- links
- lists
- tables
- images
- multiline content
- unsupported HTML

Verify whether the editor:

- preserves formatting
- sanitizes formatting
- strips formatting
- converts unsupported elements
- rejects unsafe content

The expected behavior should be documented.

---

Test Paste Sanitization

Clipboard content can come from outside the application.

That means it should be treated as external input.

For applications accepting HTML or rich content, test potentially dangerous markup.

For example:

<script>...</script>

or event-handler attributes.

The application should not blindly insert untrusted clipboard HTML into the DOM.

Clipboard testing can therefore contribute to security assurance.

---

Test Pasting From External Applications

A useful manual and automated strategy is to test content copied from different sources.

Examples:

- browser
- text editor
- spreadsheet
- document editor
- terminal
- code editor

Different applications may put different clipboard representations into the system clipboard.

Your application should behave correctly for the sources it claims to support.

---

Test Pasting Into External Applications

The reverse is also useful.

Copy content from your application and paste it into:

- spreadsheet
- document editor
- text editor
- browser
- code editor

This helps determine whether the application's clipboard representation is actually useful outside its own UI.

---

Test Clipboard Content Fidelity

A useful principle is:

What goes in should come out according to the documented transformation rules.

For plain text:

Source
↓
Copy
↓
Paste
↓
Expected text

For rich content:

Source formatting
↓
Copy
↓
Paste
↓
Expected formatting

For structured content:

Source structure
↓
Copy
↓
Paste
↓
Expected structure

The test should compare meaningful content, not just the presence of a paste event.

---

Test Empty Clipboard

What happens when the clipboard contains nothing useful?

Test:

- empty text
- no selection
- unsupported content
- unavailable clipboard

The application should behave predictably.

For paste operations, verify that empty input does not accidentally:

- overwrite existing data
- submit a form
- trigger an unintended action
- clear a field

---

Test Very Large Clipboard Content

Small strings are not enough.

Test:

- 1 KB
- 100 KB
- 1 MB
- large supported content

depending on the product.

Observe:

- response time
- memory use
- UI freezing
- truncation
- browser errors
- application crashes

For editors and data-heavy applications, large clipboard payloads can expose performance problems.

---

Test Repeated Copy and Paste

Perform:

Copy
Paste
Copy
Paste
Copy
Paste

Then test:

Copy A
Copy B
Paste

The clipboard should contain the most recent intended content.

Also test rapid repeated operations.

This can reveal race conditions in applications that maintain their own clipboard state.

---

Test Clipboard State After Navigation

For a web application:

Copy
↓
Navigate away
↓
Return
↓
Paste

The system clipboard is outside the normal page state.

The application should not incorrectly assume that its previous page state still represents the clipboard.

Test whether the product behaves correctly after:

- navigation
- refresh
- opening a new tab
- closing a tab
- logging out

---

Test Clipboard Across Tabs

A useful scenario:

Tab A:

Copy content

Tab B:

Paste

Then reverse it.

Also test:

Tab A copies A
Tab B copies B
Tab A pastes

The final clipboard content should reflect the most recent successful system-level operation.

If the application has its own clipboard abstraction, verify that it does not incorrectly override the system clipboard.

---

Test Clipboard and Authentication

Some applications copy sensitive information such as:

- API keys
- tokens
- passwords
- recovery codes
- private URLs

Test whether clipboard actions are available only to authorized users.

Also consider:

- logout
- session expiration
- permission changes
- restricted fields

The clipboard can become a data-exposure boundary.

---

Test Sensitive Data Handling

If the product copies sensitive information, verify:

- correct value is copied
- value is not logged unnecessarily
- value is not displayed in debug output
- unauthorized users cannot trigger the copy action
- clipboard content is cleared if the product explicitly promises that behavior

Do not assume that "Copy" is harmless simply because it doesn't send data to the server.

The system clipboard can contain sensitive information outside the application's control.

---

Test Copy Buttons With Dynamic Data

Many applications copy dynamically generated values.

Examples:

- invitation links
- API tokens
- order IDs
- generated passwords
- tracking numbers
- share URLs

Test that the copied value corresponds to the current UI state.

A classic defect:

UI displays token B
↓
Copy button copies token A

This can happen when the UI updates but the event handler still references stale state.

---

Test Copy After Data Refresh

Consider:

Record A loaded
↓
User refreshes data
↓
Record B loaded
↓
User clicks Copy

Verify that the clipboard contains B, not stale A.

This is particularly important in reactive frontends.

---

Test Clipboard With Dynamic Lists

Suppose a page contains:

User A [Copy]
User B [Copy]
User C [Copy]

Click the second Copy button.

Verify:

Clipboard = User B

A common automation or frontend bug is accidentally binding every button to the first item.

Test every relevant item position:

- first
- middle
- last

Also test dynamically inserted items.

---

Test Clipboard in Modals and Overlays

Clipboard actions can behave differently when elements are inside:

- modal dialogs
- popovers
- dropdowns
- side panels
- iframe-based editors

Test:

Open modal
↓
Click Copy
↓
Verify clipboard

Also test focus management.

A clipboard action can appear to work while the actual selection belongs to another element.

---

Test Clipboard Inside Iframes

If the product uses iframes, test clipboard behavior inside and outside the frame.

Verify:

- copy
- paste
- permission behavior
- secure context
- cross-origin restrictions
- fallback behavior

Clipboard access can be affected by browser security boundaries and embedded contexts.

---

Test Clipboard in Embedded Applications

For applications embedded inside:

- portals
- dashboards
- SaaS integrations
- iframes
- third-party shells

test whether clipboard permissions and user gestures still behave as expected.

The same application can behave differently when opened directly versus embedded.

---

Test Accessibility

Clipboard actions should also be accessible.

Verify:

- Copy button is keyboard accessible
- Paste-related controls are accessible
- focus state is visible
- success messages are announced where appropriate
- failure messages are understandable
- keyboard shortcuts work where supported

Do not make clipboard functionality dependent entirely on mouse interaction.

---

Automating Clipboard Tests

A strong automated clipboard test should verify the actual content.

Conceptually:

1. Open page
2. Locate copy action
3. Click copy
4. Read or paste clipboard content
5. Compare with expected value

For example:

Click Copy

Paste into a controlled textarea

Assert textarea value equals expected text

This can sometimes be more reliable than trying to directly inspect the operating-system clipboard in every automation environment.

The important thing is to validate the round trip:

Copy → Clipboard → Paste

rather than:

Copy → Toast

---

Test With Playwright or Browser Automation

Browser automation frameworks can test clipboard workflows, but environment setup matters.

A dedicated clipboard testing approach may need to account for:

- browser permissions
- secure context
- user activation
- browser engine
- headed/headless mode
- CI environment

Cross-browser clipboard testing solutions also commonly expose separate handling for text, rich text, selection, and fallback behavior. :contentReference[oaicite:3]{index=3}

The test framework should not hide these environmental assumptions.

Document them.

---

Avoid Brittle Clipboard Assertions

Do not build every test around exact browser implementation details.

For example, if the product requirement is:

Copy the visible URL.

Then the strongest assertion is:

Clipboard content = expected URL

Not:

navigator.clipboard.writeText was called exactly once

The implementation may change.

The user-facing contract should remain stable.

Test implementation details only when they are themselves part of the requirement.

---

Test Clipboard Failure in CI

Clipboard tests often behave differently in CI.

A local developer may have:

- interactive browser
- permissions already granted
- desktop clipboard
- headed browser

while CI may have:

- headless browser
- container
- restricted permissions
- no normal desktop session

If clipboard tests pass locally but fail in CI, first determine whether the failure is:

Application behavior

or:

Environment capability.

This distinction saves a lot of debugging time.

---

A Practical Clipboard Test Matrix

| Area | Test |
|---|---|
| Basic | Copy plain text |
| Basic | Paste plain text |
| Selection | Partial selection |
| Selection | Full selection |
| Text | Multiline |
| Text | Whitespace |
| Text | Tabs |
| Text | Unicode |
| Text | Special characters |
| Formatting | Bold/italic |
| Formatting | Lists |
| Formatting | Links |
| Structured | Tables |
| Media | Images |
| Files | File clipboard where supported |
| Keyboard | Ctrl/Cmd+C |
| Keyboard | Ctrl/Cmd+X |
| Keyboard | Ctrl/Cmd+V |
| Failure | Clipboard blocked |
| Failure | Permission denied |
| Failure | API unavailable |
| Fallback | Legacy copy path |
| Browser | Chromium |
| Browser | Firefox |
| Browser | WebKit/Safari |
| Environment | Headed |
| Environment | Headless |
| Environment | CI |
| Security | Sensitive values |
| Security | Authorization |
| Performance | Large content |
| Integration | External application paste |
| Integration | External application copy |

---

Example: Testing a "Copy API Key" Feature

Suppose an application displays:

API Key:
sk-test-123456

and provides:

[ Copy ]

A weak test:

Click Copy
Assert "Copied" toast

A stronger test:

Step 1

Verify the displayed API key.

Step 2

Click Copy.

Step 3

Paste into a controlled field.

Step 4

Verify the pasted value exactly matches the displayed key.

Step 5

Refresh the page.

Step 6

Generate a new key.

Step 7

Click Copy again.

Step 8

Verify the new key is copied.

Step 9

Test unauthorized access.

Step 10

Test clipboard failure.

This catches far more real defects.

---

Example: Testing a Rich Text Editor

Consider an editor containing:

Heading

This is bold text.

• Item one
• Item two

Copy the entire content.

Then paste it into another editor.

Verify:

- heading structure
- bold formatting
- list structure
- text content
- spacing
- links
- unsupported elements

Then paste into a plain textarea.

Verify that the result becomes the expected plain-text representation.

This gives you two different clipboard contracts from the same source.

---

AI-Assisted Clipboard Testing

AI can help discover clipboard scenarios that teams often overlook.

Given a feature such as:

Copy customer details

AI can generate scenarios involving:

- empty values
- Unicode
- long text
- special characters
- multiline content
- sensitive fields
- dynamic values
- permission failures
- browser differences
- rapid repeated clicks

For a rich-text editor, AI could identify:

- nested formatting
- lists
- links
- tables
- images
- unsupported markup
- pasted HTML
- sanitization cases

The important value is not simply generating more test cases.

It's identifying the content types and browser conditions that change clipboard behavior.

AI can also help build a clipboard compatibility matrix:

Feature
×
Browser
×
Permission
×
Content Type
×
Environment

That can expose coverage gaps quickly.

But the expected result should still come from the product requirements and supported browser contract.

---

Common Clipboard Testing Mistakes

Mistake 1: Testing only the toast

"Copied!" does not prove that the clipboard contains the right content.

Verify the actual clipboard result.

---

Mistake 2: Testing only plain text

Real applications often copy:

- HTML
- links
- tables
- images
- structured data

Test the content types the product supports.

---

Mistake 3: Ignoring browser permissions

Clipboard behavior is affected by browser security policies.

Test permission and user-gesture scenarios deliberately.

---

Mistake 4: Testing only one browser

Clipboard behavior can vary across browser engines.

Test the supported browser matrix.

---

Mistake 5: Ignoring CI

Clipboard tests may require special environment configuration.

Make sure the CI environment actually supports the behavior being tested.

---

Mistake 6: Ignoring failed clipboard writes

The application should not claim success when the browser rejected the operation.

Force failure and verify the UI.

---

Mistake 7: Ignoring Unicode

English-only clipboard tests miss internationalization problems.

Test real Unicode content.

---

Mistake 8: Ignoring sensitive clipboard data

API keys, passwords, tokens, and recovery codes can create security concerns.

Test access and handling carefully.

---

Clipboard Testing Checklist

Copy

- [ ] Plain text copies correctly
- [ ] Multiline text copies correctly
- [ ] Unicode copies correctly
- [ ] Special characters are preserved
- [ ] Whitespace behavior is correct
- [ ] Selected content is correct
- [ ] Dynamic content is current
- [ ] Copy buttons target the correct item

Paste

- [ ] Plain text pastes correctly
- [ ] Multiline content is preserved
- [ ] Rich text behaves correctly
- [ ] Tables behave correctly
- [ ] Images behave correctly
- [ ] Invalid content is handled
- [ ] Large content is handled

Permissions

- [ ] Allowed operation works
- [ ] Denied operation is handled
- [ ] Permission prompt is handled
- [ ] User gesture requirements are respected
- [ ] Secure context is supported
- [ ] Unsupported browser behavior is handled

Browser

- [ ] Chromium tested
- [ ] Firefox tested
- [ ] WebKit/Safari tested
- [ ] Headed environment tested where needed
- [ ] Headless environment tested
- [ ] CI environment tested

Failure

- [ ] Clipboard API failure
- [ ] Permission failure
- [ ] Network-independent clipboard failure
- [ ] Fallback path
- [ ] No false success message
- [ ] No accidental data loss

Security

- [ ] Sensitive copy actions authorized
- [ ] Clipboard data is not unnecessarily logged
- [ ] Pasted HTML is sanitized where required
- [ ] Sensitive fields follow product policy
- [ ] Unauthorized users cannot access copy functionality

---

Final Thoughts

Clipboard functionality looks simple because the user experience is simple.

But the technical path is not.

A modern clipboard workflow can involve:

User
↓
Application
↓
Browser
↓
Permission / User Gesture
↓
Clipboard API
↓
Operating System
↓
Destination Application

Every boundary can introduce a different class of bug.

That's why a test like:

Click Copy
Assert "Copied"

isn't enough.

A stronger strategy verifies:

- what was selected
- what was copied
- what actually reached the clipboard
- what happens when it is pasted
- whether formatting survives
- whether Unicode survives
- whether permissions behave correctly
- whether browser differences are handled
- whether fallback paths work
- whether failures are communicated honestly
- whether sensitive information is protected

The most important mindset shift is simple:

Don't test the Copy button. Test the clipboard contract.

Because a green "Copied" message is only useful if the thing the user actually needs to paste is sitting in the clipboard exactly as the application promised.