For some reason when I run my tests at work the browser is maximized, but when I run them at home it only opens a browser window of about 50% width. This causes some discrep
I simply added the code below in my protractor.conf.js file and it did work fine.
onPrepare: function() {
var width = 1600;
var height = 1200;
browser.driver.manage().window().setSize(width, height);
},
What purpose does the setTimeout and executeScript serve in your answer? I struggle to find best practices in the protractor documentation...
To my mind, using directly maximize() is a bad idea and should not be the preferred method, since it would not set the same size on every machine where the tests are executed and could break responsive behaviours.