question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG]: Copy To Clipboard

See original GitHub issue

Context:

  • Playwright Version: 1.0.0-next.1587832636942
  • Operating System: Mac
  • Extra: [any specific details about your environment]

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and that we can run and debug locally. For example:

const context = await browser.newContext();
context.grantPermissions(['clipboard-read']);

Describe the bug

The above snippet produces the following error:

Unknown permission: clipboard-read

this occurs when I run yarn test

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
miraocommented, Jun 24, 2022

Reading from clipboard works with FF 99, but you have to set the Firefox option "dom.events.testing.asyncClipboard": true, put it into firefoxUserPrefs.

1reaction
dgozmancommented, Apr 30, 2020

From readText MDN article:

Firefox only supports reading the clipboard in browser extensions, using the “clipboardRead” extension permission.

That means await navigator.clipboard.readText() will not work in Firefox, so testing it and granting the permission is pointless.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to fix clipboard when it does not copy and paste
The first step in resolving this issue for me was to disable all firewalls to then test the clipboard functions. If this step...
Read more >
[SOLVED] Copy and Paste Not Working on Windows 10
How to fix copy and paste not working? · Close any video players · Close any open applications · Clear your clipboard ·...
Read more >
how to fix copy to clipboard bug in javascript? - Stack Overflow
I think as you add href to your <a> the window does not clear all selected strings, and so it copies both values....
Read more >
[Bug]: Copy to clipboard from Share menu doesn't work #25678
Have a tab open. Tap the hamburger menu in the bottom right. Tap the "share" icon at the bottom of the menu. Tap...
Read more >
Google Chrome bug lets sites write to clipboard without asking
Chrome version 104 accidentally introduced a bug that removes the user requirement to approve clipboard writing events from websites they ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found