0

I was trying to automate a task in Python 3 using Selenium, where I need to click on a dropdown option. I was able to get the web element, but the click() function is not working on it.

driver.find_element_by_xpath("//li[@id='btnRemoveWorkflow']").click()  throws an error 

"selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable"
<ul class="dropdown-menu">

    <li id="btnFillFromSignTemplate">...</li>

    <li id="btnSaveAsSignTemplate">...</li>

    <li id="btnManageSignTemplate">...</li>         

    <li class="divider"></li>...</li>

    <li id="btnCancelWorkflow" class=" disabled " data-original-title="" title="">                          

    <li class="divider"></li>

    <li id="btnRemoveWorkflow" class="" data-original-title="" title="">...</li>                        

</ul>
orde
  • 5,233
  • 6
  • 31
  • 33

2 Answers2

0

Click the dropdown and wait for the element to be clickable

0

Try this:

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
ele = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, element)))
ele.click()

I think your element is hidden or overlayed.

An Khang
  • 261
  • 2
  • 9