I am trying to grab data after I load the page sometimes there could be multiple pages of information. I have two issues first there is an option to show 10, 25, 50, or 100 items per page. I would like to start by setting the default of 10 to 100 per page. However the bigger problem is selecting the element that allows you to iterate through the pages by going to the next page
the element is:
However I cannot seem to be able to click on this element
My code to get to this page is:
I have tried multiple ways of looping through the elements but none seem to work. Any ideas?
the element is:
However I cannot seem to be able to click on this element
My code to get to this page is:
VBA Code:
Sub TestSite()
Dim url As String
Dim pgcount As Integer
url = "https://www.ocpafl.org/Searches/ParcelSearch.aspx/"
'Set objIExplorer = CreateObject("InternetExplorer.Application")
Set objIExplorer = New InternetExplorerMedium
objIExplorer.Silent = True
objIExplorer.Visible = True 'for testing change to true
'open page
objIExplorer.navigate url
Do While objIExplorer.Busy Or Not objIExplorer.readyState = 4: DoEvents: Loop
'______________________________________________________________________________________________________________________________________
' test
WorkingPID = 262231
' end test
'---------------------------------------------------------------------------------------------------------------------------------------
objIExplorer.document.getElementById("ctl00_ctl00_ctl00_ctl00_ContentMain_ContentMain_ContentMain_ContentMain_TabContainer1_Searches_SubTabContainer1_QuickSearches_ParcelIDSearch1_ctl00_FullParcel").Value = WorkingPID
Set Btns = objIExplorer.document.getElementsByTagName("input")
For Each b In Btns
' MsgBox b.Value
If b.Name = "ctl00$ctl00$ctl00$ctl00$ContentMain$ContentMain$ContentMain$ContentMain$TabContainer1$Searches$SubTabContainer1$QuickSearches$ParcelIDSearch1$ctl00$ActionButton1" Then
b.Click
Do While objIExplorer.Busy Or Not objIExplorer.readyState = 4: DoEvents: Loop
Exit For
End If
Next
If InStr(objIExplorer.document.body, "Your search did not return any results") Then
MsgBox "Bad Search"
Exit Sub
End If
End Sub