wait for website to load before running a script
Posted: 07 Aug 2017 14:12
Hi,
I need help on this. Im running on Windows 10 / IE 11.
Here's a part of the script inside my batchfile.
I would like for the website to load first before running any other script, BUT in this case website is not loading but it already jumps to the "Page load successfully!"
I need help on this. Im running on Windows 10 / IE 11.
Here's a part of the script inside my batchfile.
I would like for the website to load first before running any other script, BUT in this case website is not loading but it already jumps to the "Page load successfully!"
Code: Select all
IELink= "http://www.google.com"
Set IE = CreateObject("InternetExplorer.Application")
Set X = CreateObject("Wscript.Shell")
IE.AddressBar = false
IE.MenuBar = false
IE.StatusBar = true
IE.ToolBar = false
IE.Visible = false
IE.Top = 0
IE.Left = 0
IE.FullScreen = true
W = IE.Width
H = IE.Height
IE.FullScreen = false
IE.Width = W
IE.Height = H
IE.Visible = true
IE.Navigate IELink
Function Wait(IE)
Do
WScript.Sleep 200
Loop While IE.ReadyState < 4 And IE.Busy
End Function
WScript.Echo "Page load successfully!"
WScript.quit