mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 20:45:26 +00:00
Increasing timeout and fixed error msg (#2092)
* Increasing timeout and fixed error msg * increasing timeout
This commit is contained in:
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
|
// WaitLoad waits for the page to load
|
||||||
func (p *Page) WaitLoad(act *Action, out map[string]string /*TODO review unused parameter*/) error {
|
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
|
// 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,
|
// do not finish,
|
||||||
if err := p.page.WaitLoad(); err != nil {
|
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)
|
_ = p.page.WaitIdle(1 * time.Second)
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@ -46,7 +46,7 @@ func TestActionScript(t *testing.T) {
|
|||||||
<script>window.test = 'some-data';</script>
|
<script>window.test = 'some-data';</script>
|
||||||
</html>`
|
</html>`
|
||||||
|
|
||||||
timeout := 2 * time.Second
|
timeout := 15 * time.Second
|
||||||
|
|
||||||
t.Run("run-and-results", func(t *testing.T) {
|
t.Run("run-and-results", func(t *testing.T) {
|
||||||
actions := []*Action{
|
actions := []*Action{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user