@@ -64,28 +64,33 @@ module.exports = {
6464 let chromeCapabilities = Capabilities . chrome ( ) ;
6565 const options = new chrome . Options ( )
6666 chromeCapabilities . setAcceptInsecureCerts ( true ) ;
67+ let seleniumArgs = [
68+ "--window-size=1920,1080" ,
69+ "--enable-automation" ,
70+ "guest" ,
71+ "disable-infobars" ,
72+ "--disable-notifications" ,
73+ "--lang=en" ,
74+ "--disable-search-engine-choice-screen" ,
75+ "disable-popup-blocking" ,
76+ "--credentials_enable_service=false" ,
77+ "profile.password_manager_enabled=false" ,
78+ "profile.reduce-security-for-testing" ,
79+ "profile.managed_default_content_settings.popups=1" ,
80+ "profile.managed_default_content_settings.notifications.popups=1" ,
81+ "profile.password_manager_leak_detection=false"
82+ ]
83+ if ( ! runLocal ) {
84+ seleniumArgs . push ( "--headless=new" )
85+ }
6786 chromeCapabilities . set ( 'goog:chromeOptions' , {
6887 excludeSwitches : [ // disable info bar
6988 'enable-automation' ,
7089 ] ,
7190 prefs : {
7291 'profile.password_manager_enabled' : false
7392 } ,
74- args : [
75- "--enable-automation" ,
76- "guest" ,
77- "disable-infobars" ,
78- "--disable-notifications" ,
79- "--lang=en" ,
80- "--disable-search-engine-choice-screen" ,
81- "disable-popup-blocking" ,
82- "--credentials_enable_service=false" ,
83- "profile.password_manager_enabled=false" ,
84- "profile.reduce-security-for-testing" ,
85- "profile.managed_default_content_settings.popups=1" ,
86- "profile.managed_default_content_settings.notifications.popups=1" ,
87- "profile.password_manager_leak_detection=false"
88- ]
93+ args : seleniumArgs
8994 } ) ;
9095 let driver = builder
9196 . forBrowser ( 'chrome' )
0 commit comments