Protractor / webdriver seems to be bringing the window to foreground every time you take a screenshot programmatically from a test spec:
browser.takeScreenshot().then(function (png) {
// code that stores screenshot to hard-drive
});
Is there any way how to control this behaviour? I would ideally like to keep it in the background when running tests.