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{