Increasing timeout and fixed error msg (#2092)

* Increasing timeout and fixed error msg

* increasing timeout
dev
Mzack9999 2022-06-01 20:30:18 +02:00 committed by GitHub
parent 9f600d2829
commit 4bcb94e4df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -46,7 +46,7 @@ func TestActionScript(t *testing.T) {
<script>window.test = 'some-data';</script>
</html>`
timeout := 2 * time.Second
timeout := 15 * time.Second
t.Run("run-and-results", func(t *testing.T) {
actions := []*Action{