Selenium can't click element because other element obscures it Selenium can't click element because other element obscures it selenium selenium

Selenium can't click element because other element obscures it


Following nr.5 of DebanjanB's answer, I solved it by implying the code to wait for the temporary overlay to dissapear before trying to click,

wait.until(EC.invisibility_of_element_located((By.XPATH,              "//div[@class='blockUI blockOverlay']")))el_xp("//input[@value='Save']").click()


There are several ways to do this, one of the ways is by Javascript executor.

You could say:

element = driver.find_element_by_xpath("//div[@class='blockUI blockOverlay']")driver.execute_script("arguments[0].style.visibility='hidden'", element)

This way, you can block the div with class = 'blockUI blockOverlay'and your element can be clicked if I'm correct.


Also, you can try to click the element by JavaScript like this:

# element containing the product search bar and buttonssearch_area = el_id('Products').find_element_by_class_name('searchArea')# click element by executing javascriptdriver.execute_script("arguments[0].click();", search_area)