This repository was archived by the owner on Jul 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,9 @@ const test = async () => {
3030 console . log ( `${ message . type ( ) . toUpperCase ( ) } : ${ message . text ( ) } ` ) ,
3131 ) ;
3232
33- // uncomment to debug what's happening inside the browser
34- // page.on('console', (msg) => console.log('// from console: ', msg.text()));
33+ page . on ( "requestfailed" , ( request ) => {
34+ console . log ( `ERROR: ${ request . url ( ) } ${ request . failure ( ) ?. errorText } ` ) ;
35+ } ) ;
3536
3637 console . log ( "going to the page in browser..." ) ;
3738 await page . goto ( uri ) ;
Original file line number Diff line number Diff line change @@ -49,8 +49,9 @@ const test = async () => {
4949 console . log ( `${ message . type ( ) . toUpperCase ( ) } : ${ message . text ( ) } ` ) ;
5050 } ) ;
5151
52- // uncomment to debug what's happening inside the browser
53- // page.on('console', (msg) => console.log('// from console: ', msg.text()));
52+ page . on ( "requestfailed" , ( request ) => {
53+ console . log ( `ERROR: ${ request . url ( ) } ${ request . failure ( ) ?. errorText } ` ) ;
54+ } ) ;
5455
5556 console . log ( "going to the page in browser..." ) ;
5657 await page . goto ( uri ) ;
You can’t perform that action at this time.
0 commit comments