So I would like to wait for a pop-up and then click Accept. HTML looks like this:
<div class="termsBtn" onclick="checkTerms(0)" style="background-color:#dd4a42">Decline</div>
<div class="termsBtn" onclick="checkTerms(1)" style="background-color:#a6dd42">Accept</div>
I have tried all sorts, but for this current code I am getting a TimeoutException:
selenium.common.exceptions.TimeoutException: Message:
My current code:
from selenium.webdriver.support import expected_conditions as ec
wait = WebDriverWait(driver, 10)
popup = wait.until(ec.element_to_be_clickable((By.XPATH, '//input[@onclick="checkTerms(1)"]')))
popup.click()