Trying to input username during login using send_keys()
method. I guess it's able to locate the input element, as when I run until before send_keys
it works. With sending a string value in send_keys
, it's throwing an error.
selenium.common.exceptions.WebDriverException: Message: Expected [object Undefined] undefined to be a string
What am I missing?
Python : 3.5
Selenium 3.3.1
Firefox Developer Edition or Nightly (currently version > 52)
My code snippet:
login_url = "https://korunet.co.nz/"
driver = webdriver.Firefox()
driver.get(login_url)
WebDriverWait(driver, 30).until(ec.visibility_of_element_located((By.CSS_SELECTOR, '#IDToken1')))
elem = driver.find_element_by_css_selector('#IDToken1')
elem.click()
elem.clear()
elem.send_keys("10101")
Traceback (most recent call last):
File "D:/PycharmProjects/JCBbidEntry/tests/loop2.py", line 29, in elem.send_keys("10101")
File "C:\Users\BaruaR\AppData\Roaming\Python\Python35\site-packages\selenium\webdriver\remote\webelement.py", line 347, in send_keys self._execute(Command.SEND_KEYS_TO_ELEMENT, {'value': keys_to_typing(value)})
File "C:\Users\BaruaR\AppData\Roaming\Python\Python35\site-packages\selenium\webdriver\remote\webelement.py", line 491, in _execute return self._parent.execute(command, params)
File "C:\Users\BaruaR\AppData\Roaming\Python\Python35\site-packages\selenium\webdriver\remote\webdriver.py", line 238, in execute self.error_handler.check_response(response)
File "C:\Users\BaruaR\AppData\Roaming\Python\Python35\site-packages\selenium\webdriver\remote\errorhandler.py", line 193, in check_response
raise exception_class(message, screen, stacktrace)
Appears to be resolved, at least for me with the latest version of geckodriver 0.16: https://github.com/mozilla/geckodriver/releases/tag/v0.16.0
Note that version 0.16 requires selenium 3.4.
-Erinn
Same here ... Seems to be a problem with FIREFOX ... it works as expected with CHROME ;-(
i have also same problem in my case my geckodriver is 64bit but firefox is 32 bit it throws an error
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With