mirror of https://github.com/daffainfo/nuclei.git
Increasing timeout and fixed error msg (#2092)
* Increasing timeout and fixed error msg * increasing timeoutdev
parent
9f600d2829
commit
4bcb94e4df
|
@ -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
|
||||
|
|
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue