From 4bcb94e4dfdf131f0f149aac02de6fb3fc5bb871 Mon Sep 17 00:00:00 2001 From: Mzack9999 Date: Wed, 1 Jun 2022 20:30:18 +0200 Subject: [PATCH] Increasing timeout and fixed error msg (#2092) * Increasing timeout and fixed error msg * increasing timeout --- v2/pkg/protocols/headless/engine/page_actions.go | 6 +++--- v2/pkg/protocols/headless/engine/page_actions_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/v2/pkg/protocols/headless/engine/page_actions.go b/v2/pkg/protocols/headless/engine/page_actions.go index cb5359091..3d3f1da00 100644 --- a/v2/pkg/protocols/headless/engine/page_actions.go +++ b/v2/pkg/protocols/headless/engine/page_actions.go @@ -423,13 +423,13 @@ func (p *Page) SelectInputElement(act *Action, out map[string]string /*TODO revi // WaitLoad waits for the page to load func (p *Page) WaitLoad(act *Action, out map[string]string /*TODO review unused parameter*/) error { - p.page.Timeout(1 * time.Second).WaitNavigation(proto.PageLifecycleEventNameDOMContentLoaded)() + p.page.Timeout(2 * time.Second).WaitNavigation(proto.PageLifecycleEventNameDOMContentLoaded)() // Wait for the window.onload event and also wait for the network requests - // to become idle for a maximum duration of 2 seconds. If the requests + // to become idle for a maximum duration of 3 seconds. If the requests // do not finish, if err := p.page.WaitLoad(); err != nil { - return errors.Wrap(err, "could not reset mouse") + return errors.Wrap(err, "could not wait load event") } _ = p.page.WaitIdle(1 * time.Second) return nil diff --git a/v2/pkg/protocols/headless/engine/page_actions_test.go b/v2/pkg/protocols/headless/engine/page_actions_test.go index fe01f4999..e83737d05 100644 --- a/v2/pkg/protocols/headless/engine/page_actions_test.go +++ b/v2/pkg/protocols/headless/engine/page_actions_test.go @@ -46,7 +46,7 @@ func TestActionScript(t *testing.T) { ` - timeout := 2 * time.Second + timeout := 15 * time.Second t.Run("run-and-results", func(t *testing.T) { actions := []*Action{