1

trying to input text in email area in https://www.mobile.ir/users/account/login.aspx but i get error i tried using webdriverwait but it didnt worked thanks for advance hear's my code:

import time
import datetime
import random
from selenium.webdriver.chrome.options import Options
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

ch_options=Options()
ch_options.add_argument("--user-data-dir=chrome-data")
chrome=webdriver.Chrome(options=ch_options,executable_path="/Users/LENOVO/Desktop/chromedriver.exe")
ch_options.add_argument("user-data-dir=chrome-data")
chrome.get("https://www.mobile.ir/users/account/login.aspx")
chrome.find_element_by_name("email").send_keys("myemail")

and i get this error:

  File "C:\Users\LENOVO\PycharmProjects\mobile.ir\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\LENOVO\PycharmProjects\mobile.ir\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
  (Session info: chrome=83.0.4103.116)

1 Answer 1

1

You might want to try finding the element with its full xpath. I had a similar issue where I had to click on an element which has a property javascript onclick function. the full xpath method worked and no interactable exception was thrown.

Looking at the site, I think this may be the path for the e-mail:

//*[@id="login_email"]

The full xpath being:

/html/body/div[1]/div[3]/div[1]/div[2]/form/div[3]/input

Hope this helps!!

Sign up to request clarification or add additional context in comments.

Comments

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.