for the URL I want to induce clicks on the next page button.
The next page button is a <span> tag with class attribute = 'fa fa-angle-right'.
When I try the following, it gives me a TimeoutException.
This doesn’t work for any page, and even the last page.
WebDriverWait(driver,10).until(EC.element_to_be_clickable((By.CLASS_NAME, 'fa fa-angle-right')))
Where am I going wrong ?
Any help is much appreciated!
Advertisement
Answer
Selenium does not support class name with spaces, you’ll have to remove spaces and put . to make a css_selector out of it.
WebDriverWait(driver,10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, 'span.fa.fa-angle-right')))