Hello all
I have the following code and I want to be able to click the hyperlink associated with the td of the webpage. How do I do this?
Thanks.Dim trCollection As Object Dim tdCollection As Object Dim tdObj As Object Dim trObj As Object Dim dd As Object 'get everything in the dividends table using its id Set tbObj = ie.document.getElementById("Form0") 'all table elements including headers 'get the four rows for the ONT stock (headings and data elements Set trCollection = tbObj.getElementsByTagName("tr") Dim i As Integer i = 1 'get the eight data items for each row of the ONT stock e.g stock price date etc. For Each trObj In trCollection If i = 1 Then 'print each data element one by one for each of the four rows Set tdCollection = trObj.getElementsByTagName("th") Else Set tdCollection = trObj.getElementsByTagName("td") End If i = i + 1 For Each tdObj In tdCollection If tdObj.innerText = "13-14 " Then ZT = 1 End If If tdObj.innerText = "Assessments " And ZT = 1 Then 'I WANT TO CLICK THE HYPERLINK ASSOCIATION WITH THE ABOUT "ASSESSMENTS" REFERENCE End If Next Next
James
Bookmarks