I am working on making a bot with VBScript, that opens a webpage in Internet Explorer and clicks a button. I have opening the page down, but I don't know how to click the button. I have the element. I want to do something like this:
browser.Document.All("Button_Name").Click()
'Search Google
Dim objWshShell,IE,searchStr
Set objWshShell = Wscript.CreateObject("Wscript.Shell")
Set IE = CreateObject("InternetExplorer.Application")
searchStr = InputBox("Search")
With IE
.Visible = True
.Navigate "http://www.google.com"
'Wait for Browser
Do While .Busy
WScript.Sleep 100
Loop
.Document.getElementsByName("q").Item(0).Value = searchStr
.Document.getElementsByName("btnK").Item(0).Click
End With