Testing a webpage which has an area for pasting out a tab separated text by using the CTRL+V keys only (There is no textarea or any input field), it is just a field where I can select the field by mouse click and then use CTRL+V, which automatically take all the text in the buffer.
So I get the Part of PASTING the text using the sendKeys for CTRL+v, eg: Sending Ctrl+A combination to an element
var elm = element(by.model('myModel'));
elm.sendKeys(protractor.Key.chord(protractor.Key.CONTROL, "v"));
I am STUCK at COPYING. How to copy?
Is there a way I can store the tab separated text in
var String =[col1 col2 col3 col4 col5 col6
row1 1 2 3 4 5 6
row2 7 8 9 10 11 12
row3 13 14 15 16 17 18
];
and then paste it using a CTRL+V command to paste it, on a Windows machine CTRL+V is explained here. https://msdn.microsoft.com/enus/library/windows/desktop/ms682541%28v=vs.85%29.aspx
Lets say the HTML is
<input ng-paste="paste=true" ng-init="paste=false" placeholder='paste here'>
pasted: {{paste}}