Better slow connection support

More tolerance for slow connections when running page down/end detection by waiting slightly longer and nudge the page resize before attempting click left to better tolerate slow page loads with large images or videos on slow connections.
pull/34/head
Huw 3 years ago committed by GitHub
parent 53afb72ae1
commit e8f22a1115
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -359,7 +359,7 @@ func navToEnd(ctx context.Context) error {
break
}
previousScr = scr
time.Sleep(tick)
time.Sleep(10*tick)
}
if *verboseFlag {
@ -417,6 +417,9 @@ func doRun(filePath string) error {
// navLeft navigates to the next item to the left
func navLeft(ctx context.Context) error {
var res []string
chromedp.EvaluateAsDevTools(`window.resize();`, &res)
time.Sleep(tick)
muNavWaiting.Lock()
listenEvents = true
muNavWaiting.Unlock()

Loading…
Cancel
Save