I need to access a TAG (a) that is inside an Iframe that loads on the same page after a submit.
See how strange:
- When I load the object in VBA code, I see the Iframe that I need, but the HTML inside the Iframe is not loaded into the VBA code object.
- Is it possible to perform a forced update to the Object (HTMLIFrame) load all the html that appears on the page after the submit?
Has anyone ever had this problem?
See the code:
IE.Navigate "https://xxx.xxx"
WaitIE IE
IE.Document.all("ComponentID").innerText = "gem"
Set IEDoc = IE.Document
IE.Document.all("search").form.all("search").Click
WaitIE IE
Set IEDoc = IE.Document
Set profileFrame = IEDoc.getElementById("getPathBuffer") ' getPathBuffer = Nome do Iframe
Set objCollection = profileFrame.getElementsByTagName("a") 'TAG onde está o link que preciso clicar
i = 0
While i < objCollection.Length
If objCollection(i).Name <> "" Then
MsgBox objCollection(i).Name
End If
i = i + 1
Wend