Reputation: 85
I want to open a webpage in internet explorer and navigate to a page and click on a button in the page using vbscript. For example
This was the only thing i could find (only to open a page in IE ) :
Set WshShell = WScript.CreateObject("WScript.Shell")
Return = WshShell.Run("iexplore.exe www.gmail.com", 1)
please help me out.
Upvotes: 3
Views: 23739
Reputation: 7449
Something like:
Set IE = CreateObject("InternetExplorer.Application")
Set WshShell = WScript.CreateObject("WScript.Shell")
IE.Navigate "http://mydomain.com/form.asp"
IE.Visible = True
Wscript.Sleep 2000
IE.Document.All.Item("Item1Id").Value = "1000"
IE.Document.All.Item("Item2Id").Value = "1001"
IE.Document.All.Item("Item3Id").Value = "Some Text"
Call IE.Document.Forms(0).Submit()
Upvotes: 2