I am getting Error in Communicating with Remote browser. It may have died when closing an existing browser created by protractor and switching to newly created window and then finding element by Link Text. Below is the code snippet. Kindly help in resolving the issue.
browser.driver.getAllWindowHandles().then(function(handles){
browser.driver.switchTo().window(handles[0]);
browser.driver.close();
browser.driver.switchTo().window(handles[1]);
});
element(by.linkText('connect')).isPresent(); // While Executing This code it throws the above error and Fails...