ElementClickInterceptedException - Failing test case some times | Selenium Python Forum
S
Sambhav Puri Posted on 06/11/2020

Hi,

While executing a test case I have noticed some times my test case gets failed due to the following reason:

selenium.common.exceptions.ElementClickInterceptedException: Message: Element <input id="abcTab" name="tabname" type="submit"> is not clickable at point (x,y) because another element <div id="xyz"> obscures it

 

I tried creating a function isElementClickable with below logic to wait until the object is clickale. And, in genkeywords i am calling this function in getElement function along with isElementPresent and isElementVisible functions before performing any action. Still the problem persists. Can you suggest what I can do to resolve it.


try:
element = WebDriverWait(self.driver, 10).until(
EC.element_to_be_clickable(("xpath", "some text")))

return element

except Exception as e:
print(e)


J
Jaspreet Replied on 07/11/2020

Hey

Kindly share your code zipped so that I can check.


S
Sambhav Puri 2 days ago

Hi Jaspreet. Please find attached the code.