File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -486,7 +486,7 @@ class Puppeteer extends Helper {
486486 if ( ! page ) return ;
487487 page . setDefaultNavigationTimeout ( this . options . getPageTimeout ) ;
488488 this . context = await this . page . $ ( 'body' ) ;
489- if ( this . config . browser === 'chrome' ) {
489+ if ( this . options . browser === 'chrome' ) {
490490 await page . bringToFront ( ) ;
491491 }
492492 }
@@ -658,9 +658,9 @@ class Puppeteer extends Helper {
658658 url = this . options . url + url ;
659659 }
660660
661- if ( this . config . basicAuth && ( this . isAuthenticated !== true ) ) {
661+ if ( this . options . basicAuth && ( this . isAuthenticated !== true ) ) {
662662 if ( url . includes ( this . options . url ) ) {
663- await this . page . authenticate ( this . config . basicAuth ) ;
663+ await this . page . authenticate ( this . options . basicAuth ) ;
664664 this . isAuthenticated = true ;
665665 }
666666 }
Original file line number Diff line number Diff line change @@ -72,9 +72,12 @@ class REST extends Helper {
7272 this . options . maxBodyLength = maxContentLength ;
7373 }
7474
75- this . options = { ...this . options , ...config } ;
75+ // override defaults with config
76+ this . _setConfig ( config ) ;
77+
7678 this . headers = { ...this . options . defaultHeaders } ;
7779 this . axios = axios . create ( ) ;
80+ // @ts -ignore
7881 this . axios . defaults . headers = this . options . defaultHeaders ;
7982 }
8083
Original file line number Diff line number Diff line change @@ -977,12 +977,12 @@ class WebDriver extends Helper {
977977 */
978978 amOnPage ( url ) {
979979 let split_url ;
980- if ( this . config . basicAuth ) {
980+ if ( this . options . basicAuth ) {
981981 if ( url . startsWith ( '/' ) ) {
982- url = this . config . url + url ;
982+ url = this . options . url + url ;
983983 }
984984 split_url = url . split ( '//' ) ;
985- url = `${ split_url [ 0 ] } //${ this . config . basicAuth . username } :${ this . config . basicAuth . password } @${ split_url [ 1 ] } ` ;
985+ url = `${ split_url [ 0 ] } //${ this . options . basicAuth . username } :${ this . options . basicAuth . password } @${ split_url [ 1 ] } ` ;
986986 }
987987 return this . browser . url ( url ) ;
988988 }
You can’t perform that action at this time.
0 commit comments