When the server is under heavy load its response took about two minutes. WaitForLoad function takes too long for application. How can wait for about 20 seconds and throw exception? I tried this;
WaitForLoadForXSeconds(DesiredState:="complete", Interval:=100, forXSeconds:= 10) { forXSeconds := forXSeconds * 1000 donguBaslamaAni := A_TickCount while (this.Evaluate("document.readyState").value != DesiredState) { Sleep, Interval if ((A_TickCount - donguBaslamaAni) > 300) { Throw Exception ("Sayfa yanıt vermiyor.") Return } } }
When the server is under heavy load its response took about two minutes. WaitForLoad function takes too long for application. How can wait for about 20 seconds and throw exception? I tried this;
WaitForLoadForXSeconds(DesiredState:="complete", Interval:=100, forXSeconds:= 10) { forXSeconds := forXSeconds * 1000 donguBaslamaAni := A_TickCount while (this.Evaluate("document.readyState").value != DesiredState) { Sleep, Interval if ((A_TickCount - donguBaslamaAni) > 300) { Throw Exception ("Sayfa yanıt vermiyor.") Return } } }
But didnt worked.