File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,7 @@ class Puppeteer extends Helper {
259259      headless : ! this . options . show , 
260260      ...this . _getOptions ( config ) , 
261261    } ; 
262+     if  ( this . puppeteerOptions . headless )  this . puppeteerOptions . headless  =  'new' ; 
262263    this . isRemoteBrowser  =  ! ! this . puppeteerOptions . browserWSEndpoint ; 
263264    popupStore . defaultAction  =  this . options . defaultPopupAction ; 
264265  } 
@@ -742,7 +743,8 @@ class Puppeteer extends Helper {
742743    assertElementExists ( els ,  locator ,  'Element to focus' ) ; 
743744    const  el  =  els [ 0 ] ; 
744745
745-     await  focusElement ( el ,  this . page ) ; 
746+     await  el . click ( ) ; 
747+     await  el . focus ( ) ; 
746748    return  this . _waitForAction ( ) ; 
747749  } 
748750
Original file line number Diff line number Diff line change @@ -137,8 +137,12 @@ describe('Puppeteer', function () {
137137    } ) ; 
138138
139139    it ( 'should be unauthenticated ' ,  async  ( )  =>  { 
140-       await  I . amOnPage ( '/basic_auth' ) ; 
141-       await  I . dontSee ( 'You entered admin as your password.' ) ; 
140+       try  { 
141+         await  I . amOnPage ( '/basic_auth' ) ; 
142+         await  I . dontSee ( 'You entered admin as your password.' ) ; 
143+       }  catch  ( e )  { 
144+         expect ( e . message ) . to . eq ( 'net::ERR_INVALID_AUTH_CREDENTIALS at http://localhost:8000/basic_auth' ) ; 
145+       } 
142146    } ) ; 
143147  } ) ; 
144148
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments