Hi I'm new to Selenium and trying to do some automation on a webpage. When it first loads up a pop up window is displayed. When I inspect the element the close button appears as follows
<span title="Close" class="js-close-class offer-close"></span>
I am trying to close this pop up with the following code in my script:
driver.get("https://www.oddschecker.com/")
driver.implicitly_wait(5)
element = driver.find_element_by_class_name("js-close-class offer-close")
element.click()
time.sleep(10)
driver.quit()
This code is unable to find the element and will not close the pop up. Can anyone help me?