It doesn't have id element into second button elements except type, value and onclick;
Below is my webUI code
Below is my VBA code
error in blow script of second button
Please help me, how to automate second JS button?
Below is my webUI code
Code:
<input type="button" value="Download onclick="javascript:__doPostBack('GridView1','Account_number$0')">
Code:
Dim htmlDoc As HTMLDocument
Dim MyBrowser As InternetExplorer
Dim MyHTML_Element As IHTMLElement
Dim myURL As String
On Error GoTo Err_Clear
myURL = "url......................."
Set MyBrowser = New InternetExplorer
MyBrowser.Silent = True
MyBrowser.Navigate myURL
MyBrowser.Visible = True
Do
Loop Until MyBrowser.ReadyState = READYSTATE_COMPLETE
Set htmlDoc = MyBrowser.Document
htmlDoc.all.txtAccNo.Value = "0" & "" & TextBox2.Value
htmlDoc.all.ddlReasons.Value = "1"
htmlDoc.all.txtRequester.Value = TextBox3.Text 'Enter your password here
htmlDoc.all.txtMobNo.Value = "0" & "" & TextBox1.Value
htmlDoc.all.txtLandLine.Value = ""
htmlDoc.all.txtEmailAdd.Value = Range("E15")
htmlDoc.all.ddlRelation.Value = "3"
htmlDoc.all.button1.Click
Code:
htmlDoc.getElementsByXpath("input[type=""button""]").Click