Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

225
Vistas
Pop-Up in Selenium, "</button> is not clickable at point"

I understand that versions of this questions have been asked before--this may be a repeat--but I've searched through all of those and can't find a working solution.

I'm trying to web scrape some data from air.norfolk.gov. The disclaimer popup at the beginning is really giving me troubles (My whole goal right now is just get rid of the popup at the beginning so I can actually scrape the data!).

Here's my current code:

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from webdriver_manager.chrome import ChromeDriverManager
import time

driver = webdriver.Chrome(ChromeDriverManager().install())
driver.maximize_window()

driver.get('https://air.norfolk.gov')

time.sleep(5)

element_name = driver.find_element(By.TAG_NAME, 'button')

print("Element is visible? " + str(element_name.is_displayed()))

driver.find_element(By.TAG_NAME, 'button').click()
print('button clicked')

time.sleep(5)

# Get search box element from webElement 'q' using Find Element
search_box = driver.find_element(By.ID, "primary_search")

search_box.send_keys("this would be where the address goes")

I've tried a number of things that you'll be able to notice: I've tried checking if the element is visible--it is. I've tried adding waits to make sure it was ready to receive my click. I've tried to use send_keys instead of click() because it looks like this button is wrapped in a div.

Every time I run the script, I look at the website and the disclaimer has not gone away.

The error I'm getting is:

selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <button type="button" class="btn primary-button">...</button> is not clickable at point (912, 317). Other element would receive the click: <div class="modal-body">...</div>

I'm just not sure why the element can't receive the click.

Please help!

Thanks

about 4 years ago · Juan Pablo Isaza
3 Respuestas
Responde la pregunta

0

There are 5 elements highlighting the button tag. Hence finding the element with tag-name would not work as expected.

Try with below xpath to click on I Understand.

//button[text()='I Understand']

Try with below code:

#Imports required for Explicit waits:

from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By

driver.get("https://air.norfolk.gov")

wait = WebDriverWait(driver,30)

wait.until(EC.element_to_be_clickable((By.XPATH,"//button[text()='I Understand']"))).click()
about 4 years ago · Juan Pablo Isaza Denunciar

0

You find the wrong button. You can find it with the CSS tag: #btn-primary.

I suggest you go to that website and open the DevTools and do the test with normal javascript, you will figure it out quickly

about 4 years ago · Juan Pablo Isaza Denunciar

0

If the disclaimer popup is an alert then it can be handled as following:

driver.switchTo().alert().dismiss();

Or:

driver.switchTo().alert().accept();

Also try to use driver.getWindowHandles() to switch between the windows and then click on the element.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda