Я автоматизирую отправку формы с помощью VBA и IE.Я могу отправить форму, однако после отправки формы я не могу получить последний статус метки формы документа IE. Вот код, который я использую для URL http://www.tangoloans.co.uk/brokerform/?affl_id=216
URL= "http://www.tangoloans.co.uk/brokerform/?affl_id=216" recordCount = Sheets (" Data "). Ячейки (Rows.Count," A "). End (xlUp) .row
Set appIE = New InternetExplorer
appIE.navigate URL
Do While appIE.readyState <> READYSTATE_COMPLETE
Application.StatusBar = "Waiting ..."
DoEvents
Loop
appIE.Visible = True
Set Doc = appIE.document
Doc.getElementById("title").Value = .Range("A" & row)
Doc.getElementById("fname").Value = .Range("B" & row)
Doc.getElementById("lname").Value = .Range("C" & row)
Doc.getElementById("dobDay").Value = .Range("D" & row)
Doc.getElementById("dobMonth").Value = .Range("E" & row)
Doc.getElementById("dobYear").Value = .Range("F" & row)
Doc.getElementById("l_amount").Value = .Range("M" & row)
Doc.getElementById("l_terms").Value = .Range("N" & row)
Doc.getElementById("h_phone").Value = .Range("G" & row)
Doc.getElementById("m_phone").Value = .Range("H" & row)
Doc.getElementById("address1").Value = .Range("J" & row)
Doc.getElementById("town_city").Value = .Range("K" & row)
Doc.getElementById("p_code").Value = .Range("L" & row)
Doc.getElementById("email").Value = .Range("I" & row)
If .Range("O" & row) = "Tenant" Then
Doc.all("owner")(1).Click
Else
Doc.all("owner")(0).Click
End If
If .Range("P" & row) = "Tenant" Then
Doc.all("guarantor")(1).Click
Else
Doc.all("guarantor")(0).Click
End If
Doc.getElementById("contactViaPost").Checked = True
Doc.getElementById("contactViaEmail").Checked = True
Doc.getElementById("contactViaPhone").Checked = True
Doc.getElementById("agreeToTOS").Checked = True
Doc.getElementById("submit_application").Click
Do While appIE.readyState <> READYSTATE_COMPLETE
Application.StatusBar = "Waiting ..."
Application.Wait DateAdd("s", 1, Now)
Loop
Application.Wait DateAdd("s", 20, Now)
Set HCollection = appIE.document.getElementsByTagName("h2")
For Each c In HCollection
If c.className = "vc_custom_heading" Then
.Range("Q" & row) = c.innerText
Exit For
End If
Next
однако эта строка
.Range ("Q" & row) = c.innerText
всегда возвращает мне старый текст
Я пытался увеличить время ожидания, но не удачу. Можеткто-нибудь, помогите здесь