Hello Experts,
I am working on automating a login to a webpage using SendKeys. The problem I am having is that I am trying to figure out how to get the Internet window in Focus so that way it can run the commands and not keep looping. My code is below:
Thanks,
Steve
I am working on automating a login to a webpage using SendKeys. The problem I am having is that I am trying to figure out how to get the Internet window in Focus so that way it can run the commands and not keep looping. My code is below:
Thanks,
Steve
Code:
Set IE = CreateObject("InternetExplorer.Application")
set WshShell = WScript.CreateObject("WScript.Shell")
IE.Navigate "http://www.WebsiteName.com"
IE.Visible = True
Wscript.Sleep 6000
IE.Document.All.Item("email").Value = "UserName"
IE.Document.All.Item("pass").Value = "Password"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ENTER}"
Comment