Python Selenium element is not reachable by keyboard

237 views
Skip to first unread message

alec...@gmail.com

unread,
Feb 3, 2018, 10:04:00 PM2/3/18
to Selenium Users
I tried to login to a website and i can successfully input the account name--that is "acc" in the codes, but when it came the pwd, it will display an error message. And i tested that the pwd element can be fine, only the send_keys line went wrong.

It occurred in geckodriver and chromedrive, but was okay with phantomjs. Anyone knows what's happening?

acc = self.wait.until(EC.visibility_of_element_located((By.XPATH,"//tr[@valign='top']/td[2]/input[@id='account']")))
acc.send_keys(user['userid'])
time.sleep(1)
pwd = self.wait.until(EC.visibility_of_element_located((By.XPATH, "//tr[@valign='bottom']/td/input[@id='passwordInput1']")))
pwd.send_keys(user['pwd'])

selenium.common.exceptions.ElementNotInteractableException: Message: Element <input id="passwordInput1" class="inputField1" name="passwordInput1" type="text"> is not reachable by keyboard
Reply all
Reply to author
Forward
0 new messages