Skip to content Skip to sidebar Skip to footer

Python Selenium Click Next Button

I need to click the 'next' button on the following page: https://www.amazon.com/gp/goldbox/ref=gbps_ftr_s-4_bedf_wht_29726380?gb_f_deals1=dealStates:AVAILABLE%252CWAITLIST%252CWAIT

Solution 1:

The issue is Amazon attaches a numerical ending onto the ID that is different each time the page loads. Finally found a way to select it using xpath:

browser.find_element_by_xpath("//span[@class='a-declarative']/div[2]/ul/li[@class='a-last']/a")

Post a Comment for "Python Selenium Click Next Button"