The Selenium framework does not have control over the browser's print dialog, as it is outside of its scope. Trying to handle this using Protractor or Selenium alone may not provide a reliable solution.
Instead of testing the browser's print dialog directly, you can verify if the window.print function is triggered upon clicking the print button by overriding window.print method:
browser.setScriptTimeout(10);
var printButton = element(by.id('print-button'));
var result = browser.executeAsyncScript(function (elm, callback) {
function listener() {
callback(true);
}
window.print = listener;
elm.click();
}, printButton.getWebElement());
expect(result).toBe(true);
For more information, refer to the following resources: