Skip to content
Advertisement

Selenium cannot click button because there is a div overlay

I am trying to scrap this webpage https://www.tecnocasa.es/venta/piso/barcelona/barcelona/510567.html, the code i use is the following, and i think is correct:

JavaScript

The buttons are found but when i try to click one i have the error <button class="btn-default"> is not clickable at point (1138,829) because another element <div id="hide-overlay" class="hide-overlay fade-leave-active fade-leave-to"> obscures it

How can i disable this overlay and click the button to accept the conditions of the page?

Advertisement

Answer

Your code works without any problem on my computer, try this one

JavaScript

If also this will not work, you can try this code which hides the banner. However, you should run it each time that a new page is loaded

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement