Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    Cleanest approach as usual. Commented Dec 6, 2018 at 7:37
  • @andersson this worked beautifully! Thank you! how did you know that 'a > span#pagnNextString' is the appropriate css selector? When I inspect the next button and copy the css selector it shows up as '#pagnNextString'. Also, thank you for explaining implicitly_wait()! Commented Dec 6, 2018 at 8:38
  • 1
    @MariahAkinbi , Note that on last page Next button (span with id="pagnNextString") is not a child of anchor (a), but Selenium (for some reason) still "think" that it is clickable. So to break the loop on the last iteration we should explicitly specify that we need a link with "pagnNextString" child, but not just element "pagnNextString" Commented Dec 6, 2018 at 8:43