0

I keep trying to use sendkeys on an element but it keeps saying: "selenium.common.exceptions.ElementNotInteractableException: Message: Element is not visible".

The HTML code is:

<input class="form-control inspectletIgnore ng-pristine ng-untouched ng-valid-email-not-match ng-empty ng-valid-email ng-invalid ng-invalid-required" id="email" ng-disabled="ad.isEditMode" required="" name="Email" ng-model="ad.Email.value" type="email">

I've tried to locate element by different XPaths:

//*[@id="email"] | //input[@ng-model = 'ad.Email.value']

Also tried to use JavaScript:

document.getElementById('email').value='[email protected]'

None of them working. Any advice how to handle this? It's a big headache...

4
  • Which exact language you're using? Commented Nov 11, 2017 at 12:30
  • I'm using Python. Commented Nov 11, 2017 at 12:33
  • try print(len(driver.find_elements_by_id("email"))). Is it 1? Commented Nov 11, 2017 at 12:35
  • Well it's not 1 , it's 2 Commented Nov 11, 2017 at 12:39

1 Answer 1

1

There seem to be 2 authorization forms on page - the first one is hidden. To handle visible input try:

driver.find_elements_by_id("email")[1]

Also if hidden form will be removed after some time, it might be better to use

driver.find_elements_by_id("email")[-1]
Sign up to request clarification or add additional context in comments.

2 Comments

browser.find_element_by_id('email')[1].send_keys('[email protected]') TypeError: 'FirefoxWebElement' object does not support indexing How I can solve this one ?
browser.find_elements_by_id('email')[1].send_keys('[email protected]')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.