Make clipboard work even in headless mode
See original GitHub issueThe problem
Clipboard in Selenide work only in headful mode.
We can make it work in headless mode as well by using JavaScript instead of java.awt.Toolkit.
To set clipboard content:
window.clipboardData.setData('key', 'value')
To get clipboard content:
window.clipboardData.getData('key')
NB! Method getData() asks for permission. Need to find the webdriver option to suppress this dialog.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Python 3 Selenium | Clipboard not working on headless ...
However, I still cannot confirm that it works on headless mode and mainly, my code got into multiple issue (since it was coded...
Read more >Accessing clipboard content in headless mode - Google Groups
I am trying to access clipboard data in headless mode. I checked it in all channels available on Google and it says that...
Read more >15986 (Shared clipboard is not working in headless mode)
Shared clipboard works find in both directions natively (i.e., when using the Virtualbox GUI directly), but in headless mode, using RDP, copying from...
Read more >Using Headless Mode in the Java SE Platform - Oracle
To create a new Canvas component, use the Canvas class. Copy. Copied to Clipboard. Error: Could not Copy. final Canvas c = new...
Read more >Give Chrome Browser Clipboard Permissions from Cypress Test
Using "Cypress.automation" command and Chrome Debugger Protocol we can access the clipboard text from the Cypress test to verify the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think it will help, it will accept all permissions got it from browserstack
@asolntsev Type “about:config” url in ff and switch/add attrs like that clipboard=true Its new privacy policy