- 
      
 - 
        
Save asiellb/f339a41a1f0a1936a7a7e0413cbc9370 to your computer and use it in GitHub Desktop.  
    Selenium Web Driver Set Chrome Options
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //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