copy
Write text to the browser clipboard
Write quoted text to the browser clipboard. Clipboard permissions are granted on first use.
Syntax
When I copy "<text>"Requirements
| Item | Contract |
|---|---|
| Element / control shape | None — clipboard write |
| How the label binds | Quoted text is a payload |
| Qualifiers that change resolve | None |
| Platform | Web only |
| Wrong shape → use instead | Assert clipboard → should have clipboard value |
See also UI contracts.
Examples
When I copy "hello"
Then I should have clipboard value "hello"Notes
- Pair with should
have clipboard valueto assert the clipboard. - Web only. Appium /
Platform: apireturn unsupported.