Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

chrome-driver start-maximized not working in MAC OS

In windows OS, the browsers launched perfectly with the below configuration. But in MAC chrome browser is not fully maximized.

My Config File:

config.framework = 'jasmine2';
config.allScriptsTimeout = timeout;
config.getPageTimeout = timeout;
config.jasmineNodeOpts.isVerbose = true;
config.jasmineNodeOpts.defaultTimeoutInterval = timeout;
config.specs = [
    'qa/**/*Spec.js'
];

config.multiCapabilities = [{
    browserName: 'chrome',
    shardTestFiles: true,
    maxInstances: 17,
    'chromeOptions': {
        'args': ['start-maximized']
    }
}];

Environment Details:

  • Chome Browser 57.0.2987.110
  • ChromeDriver 2.28.455520
  • Protractor Version 5.1.1
  • npm Version 3.10.10
  • Node Version v6.10.0
like image 890
Barney Avatar asked Jan 04 '23 07:01

Barney


1 Answers

You could also add start-fullscreen argument in your chrome options instead of using browser.driver.manage().window().maximize(). I was having the same issue and this resolved it on Mac.

   chromeOptions: {
    args: [
        '--start-fullscreen'
    ]
  }

Hope it helps.

like image 81
Gary Fox Avatar answered Jan 12 '23 01:01

Gary Fox