Skip to content

Instantly share code, notes, and snippets.

@anandsunderraman
anandsunderraman / setChromeOptions.js
Last active July 19, 2024 12:13
Selenium Web Driver Set Chrome Options
//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();