-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Copy To Clipboard in Playwright #9019
Comments
We have a feature request for adding copy/paste clipboard support across all the browsers: #8114. Please upvote it there. Regarding your example, there is no method called writeText in Playwright yet. |
Thanks Max. Is there any other solution to get text added to clipboard? Tried JSDOM they also don't support it |
This is not yet possible. Merging into #8114 |
Hi - I am also automating openfin app. Locally launched from drive (.exe app ) , I am able to connect with CDP port 12565. But while launching openfin app via CLI, CDP port is changed and 12565 isnt connecting. How to find on which CDP openfin app is launching, so that with playwright connectOverCDP , I could connect it. This will help in CI run too. |
I am automating an openfin application
I want to copy come content to clipboard.
I tried to use the WriteText method of Clipboard API (I saw it is supported in Chrome https://caniuse.com/?search=clipboard)
But it giving me an error
Below is my code
runtimeCDPConnection = await chromium.connectOverCDP({ endpointURL: '' })
I am getting error
runtimeContext.writeText is not a function
page = await runtimeContext.pages()[0]
await page.writeText("Abcd")
var abc = await page.readText()
console.log(abc)
Again getting error
TypeError: page.writeText is not a function
Am I using it wrong? Could someone guide me to add content to clipboard
The text was updated successfully, but these errors were encountered: