Skip to content

Instantly share code, notes, and snippets.

@fatihacet
Forked from anandsunderraman/setChromeOptions.js
Last active May 2, 2024 05:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatihacet/ab0a0dac8a892ad43071 to your computer and use it in GitHub Desktop.
Save fatihacet/ab0a0dac8a892ad43071 to your computer and use it in GitHub Desktop.
//import the selenium web driver
var webdriver = require('selenium-webdriver');
var chromeCapabilities = webdriver.Capabilities.chrome();
//setting chrome options to start the browser fully maximized
var chromeOptions = {
'args': ['--test-type', '--start-maximized']
};
chromeCapabilities.set('chromeOptions', chromeOptions);
var driver = new webdriver.Builder().withCapabilities(chromeCapabilities).build();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment