0

Below is the HTML code on a site I am trying to scrape. The button on the screen is "Book Now" but a as I understand a Span is not clickable so I am trying to click "btn search-btn " with the VBA code below:-

Set AvailableLinks = appIE.document.getElementsByClassName("btn search-btn")

    AvailableLinks.Click

With above code I receive the error "object does not support property or method" Any help to point me in the right direction would be greatly appreciated.

</table>
                                </div>
                            </div>
                            <div class="form-actions clearfix">
                                <a class="btn search-btn ">
                                    <span class="end"></span>
                                    <span class="tile">Book Now</span>
                                    <span class="start ion-android-arrow-dropright-circle"></span>
                                </a>
                                <div class="validation-error ">
Anthony
  • 542
  • 1
  • 8
  • 25

1 Answers1

0

@Kazimierz Jawor Thank you the following code works:-

For Each l In appIE.document.getElementsByClassName("btn search-btn")
If l.className = "btn search-btn" Then
        l.Click
        Exit For
    End If
    Next
Anthony
  • 542
  • 1
  • 8
  • 25