Copying selected text to clipboard does not work on Windows 10 when using headless mode
Reported by
friedhoe...@gmail.com,
Nov 10 2017
|
||||
Issue description
Chrome Version : Versie 62.0.3202.89 (Officiƫle build) (64-bits)
Other browsers tested:
Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
Chrome (not headless): OK
What steps will reproduce the problem?
(1) open page (using Selenium Java)
(2) select text in input (using `element.sendKeys(Keys.CONTROL, "a")`)
(3) copy text to clipboard (using `element.sendKeys(Keys.CONTROL, "c")`)
(4) paste to other element (using `element2.sendKeys(Keys.CONTROL, "v")`)
What is the expected result?
Element2's value should be extended with value of element AND value of element should be stored on system clipboard (i.e. can be pasted in other applications)
What happens instead?
Text which was already present on system clipboard is unchanged and element2's value also remains unchanged.
Please provide any additional information below. Attach a screenshot if
possible.
This happens on Windows 10, only when using headless mode. Exactly same Java/Selenium code on same page has expected behavior when running with visible browser window (i.e. normal chrome).
The problem does NOT occur on Linux or macOS.
,
Nov 20 2017
We don't access the system clipboard in headless mode but instead use a simulated one, so this is working as intended. This is also the case on Linux (but not Mac).
,
Nov 20 2017
But shouldn't that simulated clipboard allow a value to be copied to it and then pasted from it? That seems to be the behavior on Linux, where my tests pass. But not on Windows.
,
Nov 22 2017
Yes, it should -- it just won't be synchronized with the operating system's clipboard. I probably misunderstood -- are you saying that clipboard operations don't even work just inside the browser?
,
Nov 22 2017
Indeed. Like I attempted to say in the original issue: the value of the second element is not changed after paste on Windows. On Linux or Mac it does work.
,
Nov 30 2017
I am currently having the exact same issue on Windows 7. This is causing issues with running our automated tests with Puppeteer in headless mode.
,
Dec 3
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
||||
►
Sign in to add a comment |
||||
Comment 1 by kochi@chromium.org
, Nov 10 2017