0

I am facing an error that is "Element is not currently interactable and may not be manipulated".

I am using selenium for web scraping. The site is "https://openload.co/login".

In here I am trying to input values through element.send_keys("ABC") and fill in the fields. I tried to fill it by find_element_by_id("loginform-email") and then use send_keys. So i am getting the above error.

Also I tried to use driver.find_element_by_xpath("""/*[@id="loginform-email"]""") but I get the same error i.e selenium.common.exceptions.InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated

I am aware that there is a hidden element when i use inspect element in that particular site. Can anyone help me deal with the above problem.How to manupulate or remove the hidden element.

Würgspaß
  • 4,660
  • 2
  • 25
  • 41
  • Possible duplicate of [How to resolve ElementNotInteractableException in Selenium webdriver?](https://stackoverflow.com/questions/43868009/how-to-resolve-elementnotinteractableexception-in-selenium-webdriver) – undetected Selenium Mar 20 '18 at 20:30

1 Answers1

0

You have two similar forms on the page. They both have elements with id = "loginform-email", but the first one is invisible. find_element_by_<something> returns the first occurrence of an element that corresponds to the specification given. And that element belongs to the invisible form. Therefore you're trying to send keys to the invisible element. Webdriver doesn't allow that.

You should correct your xpath to find 2nd occurrence of the input field.

driver.find_element_by_xpath("//input[@id = 'loginform-email'])[2]")

or

driver.find_element_by_xpath("//h1[.='Login']/following-sibling::form[@id ='login-form']//input[@id='loginform-email']")