element not interactable code example

Example 1: selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable

from selenium.webdriver.common.action_chains import ActionChains

button = driver.find_element_by_class_name(u"infoDismiss")
driver.implicitly_wait(10)
ActionChains(driver).move_to_element(button).click(button).perform()

Example 2: python webdriver element not interactable

element = driver.find_element_by_xpath("(//a[contains(@href, '')])[20]")
driver.execute_script("arguments[0].click();", element)

Example 3: selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable

Usually raised when the element you wish to interact with is not visible

Tags:

Misc Example