You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/config/config.go
+91-25Lines changed: 91 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -314,10 +314,18 @@ type BrowserConfig struct {
314
314
// That means for a viewport that is 500px high, and a webpage that is 2500px high, we will scroll 5 times, meaning a total wait duration of 6 * duration (as we have to wait on the first & last scrolls as well).
315
315
TimeBetweenScrolls time.Duration
316
316
// ReadinessTimeout is the maximum time to wait for the web-page to become ready (i.e. no longer loading anything).
317
-
ReadinessTimeout time.Duration
318
-
// LoadWait is the time to wait before checking for how ready the page is.
317
+
ReadinessTimeout time.Duration
318
+
ReadinessIterationInterval time.Duration
319
+
// ReadinessPriorWait is the time to wait before checking for how ready the page is.
319
320
// This lets you force the webpage to take a beat and just do its thing before the service starts looking for whether it's time to render anything.
320
-
LoadWait time.Duration
321
+
ReadinessPriorWait time.Duration
322
+
ReadinessDisableQueryWaitbool
323
+
ReadinessFirstQueryTimeout time.Duration
324
+
ReadinessQueriesTimeout time.Duration
325
+
ReadinessDisableNetworkWaitbool
326
+
ReadinessNetworkIdleTimeout time.Duration
327
+
ReadinessDisableDOMHashCodeWaitbool
328
+
ReadinessDOMHashCodeTimeout time.Duration
321
329
322
330
// MinWidth is the minimum width of the browser viewport.
323
331
// If larger than MaxWidth, MaxWidth is used instead.
Usage: "The time to wait before checking for how ready the page is. This lets you force the webpage to take a beat and just do its thing before the service starts looking for whether it's time to render anything.",
417
+
Name: "browser.readiness.iteration-interval",
418
+
Usage: "How long to wait between each iteration of checking whether the page is ready. Must be positive.",
419
+
Value: time.Millisecond*100,
420
+
Validator: func(d time.Duration) error {
421
+
ifd<=0 {
422
+
returnfmt.Errorf("browser readiness iteration-interval must be positive (got %v)", d)
423
+
}
424
+
returnnil
425
+
},
426
+
},
427
+
&cli.DurationFlag{
428
+
Name: "browser.readiness.prior-wait",
429
+
Usage: "The time to wait before checking for how ready the page is. This lets you force the webpage to take a beat and just do its thing before the service starts looking for whether it's time to render anything. If <= 0, this is disabled.",
tracingAction("WaitReady(body)", chromedp.WaitReady("body", chromedp.ByQuery)), // wait for a body to exist; this is when the page has started to actually render
0 commit comments