The dropdown isn't a dropdown (as you've mentioned). Instead, it's an unordered list with a number of links as clickable options. With that said, the For Rent
option isn't contained in str_listing-btn
. Notice how that tag closes before any of the options are available. Instead, it's contained in the list below it.
Since I couldn't get into your link without creating an account, I tested out code to select the For Rent
option on the main page. Take a look at my code, test it to see if it does what you need, then try to accommodate it into your code. Let us know if you need additional help.
Sub NavigateIt()
Dim oIE As Object
Set oIE = CreateObject("InternetExplorer.Application")
oIE.navigate ("http://www.propwall.my/classifieds")
oIE.Visible = True
Do
DoEvents
Loop Until oIE.ReadyState = 4
Set AvailableLinks = oIE.document.getelementbyid("list-listing").getelementsbytagname("a")
For Each cLink In AvailableLinks
If cLink.innerhtml = "For Rent" Then
cLink.Click
End If
Next cLink
End Sub
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…