Chromedriver + Selenium cannot send 's' key
Using Python 3.7.4, Selenium 3.141.0, Chromedriver 78 and Chrome 78.
I'm am trying to automate login to a webpage but when I send keys to the inputs in the form it sends all the characters but the 's' letter.
input = form_element.find_element_by_xpath(password_xpath) input.send_keys("password")
It only writes "paword". I've seen this issue in other querstions but the Chromedriver version was old. Also I tried with "\s" but it writes "\".
Didn't find any documentation of this. I tried with Chrome 77 + Chromedriver 77, same result. Have anyone had this problem before? What can I do?
Chrome driver, Name, Last modified, Size, ETag. [DIR], 2.0, -, -, -. [DIR], 2.1, -, -, -. [DIR], 2.10, -, -, -. [DIR], 2.11, -, -, -. [DIR], 2.12, -, -, -. [DIR], 2.13, -, -, -. [DIR], 2.14, -, -, -. [DIR]� Resolved issue 3383: ChromeDriver 80+ on Windows seems to exit or stall on certain element or click commands Resolved issue 3399: Remove wasThrown check ChromeDriver 81.0.4044.138
You could wrap
def slowly_send_keys(field, text): for c in text: field.send_keys(c) time.sleep(0.1)
You can call this as such:
input = form_element.find_element_by_xpath(password_xpath) slowly_send_keys(input, "password")
We are just waiting 0.1s between each key press here. Sometimes Selenium sends keys very quickly, and not all keystrokes get registered, so this solution is meant to work around that potential issue.
Mentioned in Debanjan's solution above, invoking
WebDriverWait on the password field should also help resolve your issue -- I wanted to provide an alternative to
send_keys in case that was part of the issue here as well.
ChromeDriver, Supported Apps. ChromeDriver supports running tests on Chrome browser ( version 30+) as well as WebView-based apps starting in Android 4.4 (KitKat) that � ChromeDriver is a separate executable that Selenium WebDriver uses to control Chrome. It is maintained by the Chromium team with help from WebDriver contributors. If you are unfamiliar with Selenium WebDriver, you should check out the Selenium site. Follow these steps to setup your tests for running with ChromeDriver:
Send Keys By Adding Wait There Because Some Time
Element Not Clickable And Also Make Sure That Your Are Giving Right
If You Don't Give Right
XPATH It Will Also Give You Error
Xpath you can use selector gadget in chrome
Well If You Are Give Right
Try This Code!
from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as input = WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "YOUR XPATH"))).send_keys("Your Password")
You Can Also Add Wait After Character Here Is The Way!
from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as input = WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "YOUR XPATH"))) for p in input: input.send_keys(p) time.sleep(0.5)
Capabilities & ChromeOptions - ChromeDriver, To avoid unnecessarily restarting the ChromeDriver server with each instance, use a RemoteWebDriver coupled with the desired ChromeDriverService , which � downloads and installs the latest chromedriver binary version for automated testing of webapps. the installer supports linux, mac and windows operating systems. this package is maintained by an automated update script on travis. if a new chromedriver version is out, this package will automaticly get updated within a day.
ChromeDriver, npm install chromedriver. Or grab the source and. node ./install.js. What this is really doing is just grabbing a particular "blessed" (by this� If you were previously automating or testing Microsoft Edge (Chromium) using ChromeDriver and ChromeOptions classes, your WebDriver code does not run on Microsoft Edge Version 80 or later. To solve this problem, update your tests to use the EdgeOptions class and install Microsoft Edge Driver .
chromedriver, Simple node module to download the ChromeDriver version for Electron. The major version of this library tracks the major version of the Electron versions released. So if you are using Electron 2.0.x you would want to use an electron-chromedriver dependency of ~2.0.0 in your package.json file. This library is used by spectron.