Is there a way to utilize copy and paste functionality with Protractor on a MAC using Chrome?
newInput.sendKeys(protractor.Key.chord(browser.controlKey, "a"));
newInput.sendKeys(protractor.Key.chord(browser.controlKey, "c"));
newInput.sendKeys(protractor.Key.chord(browser.controlKey, "v"));
Upon executing this code, I am encountering an issue where it returns "undefined"
I attempted to implement the code found in this post Using cross-platform keyboard shortcuts in end-to-end testing, however, it is not functioning as expected:
browser.controlKey = protractor.Key.CONTROL; //browser.controlKey is a global variable and can be accessed anywhere in the test specs
browser.getCapabilities().then(function(capabilities){
if(capabilities.caps_.platform === "MAC")
browser.controlKey = protractor.Key.COMMAND;
});
elm.sendKeys(protractor.Key.chord(browser.controlKey, "c"));