File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,12 @@ export default class App {
107107
108108async function generateTempFile ( event : IEvent ) {
109109
110+ try {
111+ console . log ( `Event: ${ JSON . stringify ( event , undefined , 2 ) } ` ) ;
112+ } catch {
113+
114+ }
115+
110116 let ext = ".jpg" ;
111117 if ( event . html ) {
112118 ext = ".html" ;
Original file line number Diff line number Diff line change @@ -206,9 +206,10 @@ export default abstract class Command {
206206 }
207207
208208 async waitForPageToLoad ( { timeout, page, stopTest } : IEvent ) {
209- console . log ( `Waiting for pageReady` ) ;
209+ console . log ( `Waiting for pageReady till ${ timeout } ms ` ) ;
210210 let start = Date . now ( ) ;
211211 let end = start + timeout ;
212+ let isPageReady = false ;
212213 for ( let index = start ; index < end ; index += 1000 ) {
213214 await sleep ( 1000 ) ;
214215 if ( await page . evaluate ( stopTest ) ) {
@@ -218,8 +219,11 @@ export default abstract class Command {
218219 }
219220 }
220221
222+ timeout = 3000 ;
223+
224+ console . log ( `Waiting for idle network in ${ timeout } ms` )
221225 await page . waitForNetworkIdle ( {
222- timeout : 3000
226+ timeout
223227 } ) ;
224228 }
225229
You can’t perform that action at this time.
0 commit comments