I am using Python and Selenium to scrape a web page.
I am trying to find the following 'next page' button in the page:
<button class="pagination__next" aria-label="click to go to the next page" disabled="true" aria-hidden="true"></button>
disabled='true' appears when I'm on the last page of a multi-page embedded javascript generated table.
There may be more buttons on the page and some are disabled at the time I'm looking for this particular button.
So what I'm trying to do is determine if this particular button which has class="pagination__next" with attribute disabled equals 'true' is in driver.page_source
There are plenty of examples around about identifying the particular tag ('button'). But not how to find the button and the button attribute disabled equal to 'true'
I tried various approaches. I think the closes I got was:
driver.find_element_by_css_name('pagination__next[disabled='true'])
but I don't think it worked.
There is an identical question here but OP asks for Java solution. I'm looking for Python.
Guidance please.