I can't not make my python script click the consent cookie button on the page https://www.topparrain.com/de/users/sign_up
here is my code
from selenium import webdriver
firefox_options = webdriver.FirefoxOptions()
driver = webdriver.Remote(
command_executor='http://localhost:4444',
options=firefox_options
)
driver.maximize_window()
driver.get("https://www.topparrain.com/en/referral_codes")
driver.implicitly_wait(10000)
driver.find_element_by_xpath("//p[contains(text(),'Consent')]").click()
driver.implicitly_wait(3)
driver.quit()
I have tried Xpath
and waiting
but it doesn't click on it even I run the official docker selenium Firefox container
the HTML for the button is
<button class="fc-button fc-cta-consent fc-primary-button" role="button" aria-label="Consent" tabindex="0">
<div class="fc-button-background"></div>
<p class="fc-button-label">Consent</p>
</button>