So I'm writing a script in Visual basics to fill out an online form. I'm able to fill out the first form, but after submitting the first the page refreshes with a new form but the internet explorer object is stuck on the previous html. I think if i call Location.reload() then it will refresh the html document, but I'm unable to figure out how to call it.
Dim coName As String
Dim usrName As String
Dim pwd As String
Dim wb As SHDocVw.InternetExplorer
Set wb = New SHDocVw.InternetExplorer
wb.Visible = True
wb.Navigate("*************")
While wb.Busy
Wait 0.100
Wend
wb.Document.getElementById("txt_CID").Value = "*****"
wb.Document.getElementById("txt_UID").Value = "**********"
wb.Document.getElementById("txt_PWD").Value = "*****"
wb.Document.getElementById("btnLogin").Click()
wb.Visible = True
Wait 2 (..............New Page loads here..............)
wb.Document.getElementById("ContentPlaceHolder1_ddlTechID").Value = "IP3M-01"
The last line gives the error: "not an object reference" because the document hasn't updated.
Sadly, I must use vbscript so I need to figure out how to make this work.
Dim coName As String
Dim usrName As String
Dim pwd As String
Dim wb As SHDocVw.InternetExplorer
Set wb = New SHDocVw.InternetExplorer
wb.Visible = True
wb.Navigate("*************")
While wb.Busy
Wait 0.100
Wend
wb.Document.getElementById("txt_CID").Value = "*****"
wb.Document.getElementById("txt_UID").Value = "**********"
wb.Document.getElementById("txt_PWD").Value = "*****"
wb.Document.getElementById("btnLogin").Click()
wb.Visible = True
Wait 2 (..............New Page loads here..............)
wb.Document.getElementById("ContentPlaceHolder1_ddlTechID").Value = "IP3M-01"
The last line gives the error: "not an object reference" because the document hasn't updated.
Sadly, I must use vbscript so I need to figure out how to make this work.