Deal with Pagination button hidden (selenium3.141.0,python3)

Viewed 21

So i'm trying to find the way to deal with hidden pagination button, the website completely remove the <div> for that button

This is what i'm trying to do without succeed, with the if "empty class"

# next button
        next_btn = WebDriverWait(browser, 10).until(EC.presence_of_element_located((By.CLASS_NAME, 'pagination-page-next')))
        next_class = next_btn.get_attribute('class')
        if "" in next_class:
            isNextDisabled = True
        else:
            browser.find_element(By.CLASS_NAME, 's-pagination-next').click()
```
`
0 Answers
Related