pythonseleniumselenium-webdriverwebdriverwaitexpected-condition

Selenium Expected Conditions, Wait until element is interactable?


Is there a way to get around the elementNotInteractable exception in selenium? I've used

wait.until(ec.element_to_be_clickable())

But my code will still try to interact with elements before they're fully interactable. Is the problem that I just haven't set the delay high enough when defining wait? Or is there a function like

ec.element_to_be_interactable()

which checks if the element is interactable or not?


Solution

  • element_to_be_clickable()

    element_to_be_clickable() is the expectation for for checking if an element is visible and enabled so that you can click() it.


    ElementNotInteractableException

    Unfortunately there is no specific expected_conditions as ElementNotInteractableException and it can occur for a lot of reasons and some of them are: