Intern test framework: Command + v for pasting contents from clipboard does not work

107 views Asked by At

I have contents in the clipboard which I would like to paste to a textbox. When I try

.click()
.pressKeys(['\uE03D', 'v'])

it does not paste the contents to the textbox. All other special keys work. For example, for using shift key, when I do

.pressKeys(['\uE008', 'v'])

it prints 'V' as expected.

Any advice on this would be highly appreciated.

2

There are 2 answers

0
BlockchainDeveloper On

I would try something like:

.click().pressKeys(Keys.Control + "v")
0
Edward Coyle Jr. On

I think that you've already got your answer because I think you're the same person that posted this question verbatim on the Issue Tracker for The Intern, but for those people looking at this SO ticket...

This is a known bug that isn't broken in The Intern. It's a Selenium bug, and by proxy a bug in all the Mac OS X implementations for Safari (here's a related bug on the ChromeDriver issue tracker). It appears that these commands don't work on a Mac due to the Command key issuing OS-level events that never trickle into the Javascript engine run by these browsers.

I wouldn't hold out hope for a fix because it looks like it's been an active bug since 2012...