File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed 
javascript/selenium-webdriver/test/chrome Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 1919-//javascript/atoms:test-edge
2020-//javascript/atoms:test-firefox-beta
2121-//javascript/chrome-driver/...
22- -//javascript/selenium-webdriver:test-bidi-network-test.js-chrome
2322-//javascript/selenium-webdriver:test-builder-test.js-chrome
24- -//javascript/selenium-webdriver:test-builder-test.js-firefox
2523-//javascript/selenium-webdriver:test-chrome-devtools-test.js-chrome
26- -//javascript/selenium-webdriver:test-chrome-options-test.js-chrome
2724-//javascript/selenium-webdriver:test-chrome-service-test.js-chrome
2825-//javascript/selenium-webdriver:test-firefox-options-test.js-firefox
2926-//javascript/selenium-webdriver:test-lib-capabilities-test.js-chrome
Original file line number Diff line number Diff line change @@ -34,7 +34,9 @@ test.suite(
3434    let  driver 
3535
3636    beforeEach ( async  function  ( )  { 
37-       driver  =  await  env . builder ( ) . setChromeOptions ( new  chrome . Options ( ) . addArguments ( '-headless' ) ) . build ( ) 
37+       let  options  =  env . builder ( ) . getChromeOptions ( )  ||  new  chrome . Options ( ) 
38+       options . addArguments ( '--headless' ) 
39+       driver  =  await  env . builder ( ) . setChromeOptions ( options ) . build ( ) 
3840    } ) 
3941    afterEach ( async  ( )  =>  await  driver . quit ( ) ) 
4042
@@ -125,6 +127,7 @@ test.suite(
125127        await  driver . register ( 'random' ,  'random' ,  pageCdpConnection ) 
126128        await  driver . get ( fileServer . Pages . basicAuth ) 
127129        let  source  =  await  driver . getPageSource ( ) 
130+         console . log ( source ) 
128131        assert . strictEqual ( source . includes ( 'Access granted!' ) ,  false ,  source ) 
129132      } ) 
130133    } ) 
Original file line number Diff line number Diff line change @@ -123,7 +123,8 @@ test.suite(
123123
124124    describe ( 'Chrome options' ,  function  ( )  { 
125125      it ( 'can start Chrome with custom args' ,  async  function  ( )  { 
126-         const  options  =  new  chrome . Options ( ) . addArguments ( 'user-agent=foo;bar' ) 
126+         const  options  =  env . builder ( ) . getChromeOptions ( )  ||  new  chrome . Options ( ) 
127+         options . addArguments ( 'user-agent=foo;bar' ) 
127128
128129        driver  =  await  env . builder ( ) . setChromeOptions ( options ) . build ( ) 
129130
@@ -152,7 +153,8 @@ test.suite(
152153      } ) 
153154
154155      it ( 'can install an extension from path' ,  async  function  ( )  { 
155-         let  options  =  new  chrome . Options ( ) . addExtensions ( WEBEXTENSION_CRX ) 
156+         let  options  =  env . builder ( ) . getChromeOptions ( )  ||  new  chrome . Options ( ) 
157+         options . addExtensions ( WEBEXTENSION_CRX ) 
156158
157159        driver  =  await  env . builder ( ) . forBrowser ( 'chrome' ) . setChromeOptions ( options ) . build ( ) 
158160
@@ -161,7 +163,8 @@ test.suite(
161163      } ) 
162164
163165      it ( 'can install an extension from Buffer' ,  async  function  ( )  { 
164-         let  options  =  new  chrome . Options ( ) . addExtensions ( fs . readFileSync ( WEBEXTENSION_CRX ) ) 
166+         let  options  =  env . builder ( ) . getChromeOptions ( )  ||  new  chrome . Options ( ) 
167+         options . addExtensions ( fs . readFileSync ( WEBEXTENSION_CRX ) ) 
165168
166169        driver  =  await  env . builder ( ) . forBrowser ( 'chrome' ) . setChromeOptions ( options ) . build ( ) 
167170
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments