Iam currently trying to demonstrate a copy paste action using Protracter. I need to copy a url and open a new tab and paste and navigate to it. Currently I'am able to copy and open a new tab and paste the URL in Address Bar but I'am unable to navigate to the URL in Address Bar.Please find the code below.
browser.actions().sendKeys(protractor.Key.chord(protractor.Key.CONTROL, "t")).perform();
browser.sleep(2000);
browser.getAllWindowHandles().then(function(handles){
browser.switchTo().window(handles[1]).then(function(){
//do your stuff on the pop up window
browser.actions().sendKeys(protractor.Key.chord(protractor.Key.CONTROL, 'v')).perform();
browser.actions().sendKeys(protractor.Key.chord(protractor.Key.ENTER)).perform();