Explain elementclickinterceptedexception
CONSOLE ERROR :
Message: element click intercepted: Element is not clickable at point (937, 293). Other element would receive the click: <body data-anm=".anm" class="">...</body> (Session info: chrome=88.0.4324.104)
I am clicking on the button but when I come to the button it did not click on it and showing an error.
I have also change it by XPath css but not working.
am facing this problem in selenium python
WEBSITE URL: https://aujtravels.com/breeo-canada/register
script : import time from selenium import webdriver
driver = webdriver.Chrome(executable_path="C:\\chromedriver.exe")
driver.get("https://aujtravels.com/breeo-canada/register")
driver.find_element_by_xpath("//h4[contains(text(),'Student')]").click()
time.sleep(2) driver.find_element_by_xpath("//div[@data-id='1']").click()
driver.find_element_by_id("first_name").send_keys("a")
driver.find_element_by_id("last_name").send_keys("b")
driver.find_element_by_id("email").send_keys("hr@gmail.com")
time.sleep(2) driver.execute_script(" window.scrollBy(0, 350);")
time.sleep(3)
driver.find_element_by_css_selector("div[data-id='2']").click()
There is a bug in that page - elementclickinterceptedexception, the next button is not fully displayed as footer is overlapping half of it . you can click using javascript if you are not using it to test something. THe code is as below , you have to do it for second next buttton also
next = driver.find_element_by_xpath("//div[@data-id='1']")
driver.execute_script("arguments[0].click()",next)