From 59f6603fc64802f271153362892a34bc8a564233 Mon Sep 17 00:00:00 2001 From: Daniel Lauzon Date: Thu, 9 Jan 2020 20:36:48 -0500 Subject: [PATCH] restore navLeft, removing arbitrary time.Sleep --- main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.go b/main.go index 26c640d..429ea2a 100644 --- a/main.go +++ b/main.go @@ -390,8 +390,7 @@ func doRun(filePath string) error { // navLeft navigates to the next item to the left func navLeft(ctx context.Context) error { chromedp.KeyEvent(kb.ArrowLeft).Do(ctx) - // Could wait for the location to change instead of this Sleep. - time.Sleep(200 * time.Millisecond) + chromedp.WaitReady("body", chromedp.ByQuery) return nil }