I am trying to extract 5th child in the FDA node and then click on the IMG. My solution so far only extracts the 2nd element. Any help would be highly appreciated.
<TD>Proxy to Inter</TD>
<TD>15/03/2017 7:19:18 AM</TD>
<TD>15/03/2017 7:19:18 AM</TD>
<TD>2</TD>
<TD>10</TD>
<TD>false</TD>
<TD></TD></TR>
<TR class=white><TD>FDA</TD>
<TD>Data</TD>
<TD>24/07/2017 1:21:59 PM</TD>
<TD>25/07/2017 9:42:43 AM</TD>
<TD>2</TD>
<TD>10</TD>
<TD>false</TD>
<TD><IMG onclick="Trail( style="CURSOR: hand" alt="" src="/images/task.gif"></TD></TR>
My VBA code so far:
sText = ""
Found = False
Set inputCollection = HTMLDoc.getElementsByTagName("td")
For Each inputElement In inputCollection
If Found = True Then
sText = inputElement.innerText
Worksheets("Sheet1").Cells(sht1rw, 4) = sText
Found = False
Exit For
End If
If inputElement.innerText = "FDA" Then
Found = True
End If
Next inputElement