File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Plugins/PackageToJS/Templates Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ Hint: This typically means that a continuation leak occurred.
9696 } ,
9797 browser : async ( { preludeScript } ) => {
9898 const onPageLoad = ( page ) => {
99+ console . log ( "===> onPageLoad" )
99100 page . exposeFunction ( "expectToBeTrue" , ( ) => {
100101 return true ;
101102 } ) ;
Original file line number Diff line number Diff line change @@ -100,8 +100,16 @@ Please run the following command to install it:
100100 const context = await browser . newContext ( ) ;
101101 const page = await context . newPage ( ) ;
102102 // Allow the user to customize the page before it's loaded, for defining custom export functions
103- if ( options . playwright ?. onPageLoad ) { await options . playwright . onPageLoad ( page ) ; }
103+ if ( options . playwright ?. onPageLoad ) {
104+ console . log ( "===> onPageLoad 2" )
105+ await options . playwright . onPageLoad ( page ) ;
106+ }
104107
108+ // Forward console messages in the page to the Node.js console
109+ page . on ( "console" , ( message ) => {
110+ console . log ( message . text ( ) ) ;
111+ } ) ;
112+
105113 const onExit = new Promise ( ( resolve ) => {
106114 page . exposeFunction ( "exitTest" , resolve ) ;
107115 } ) ;
You can’t perform that action at this time.
0 commit comments