I'm trying to send keys to an input box that is displayed within a dialog. The problem is that sometimes I get only the last few letters of my text, because the send_keys is sending them too fast.
I'm using Python 3.x, Selenium 3.x and working with chromedriver.
I already have a wait before sending keys:
my_input=WebDriverWait(self.driver, 10).until(EC.presence_of_element_located((By.CSS_SELECTOR, 'span label > input._58al')))
my_input.send_keys("Prueba")
I even added a second wait and a click before send_keys:
my_input=WebDriverWait(self.driver, 10).until(EC.presence_of_element_located((By.CSS_SELECTOR, 'span label > input._58al')))
WebDriverWait(self.driver, 10).until(EC.visibility_of(my_input)).click()
my_input.send_keys("Prueba")
Sometimes the text is being sent correctly. But sometimes I only get something like "ba" (from the whole text, which is "Prueba"):
I'm trying to avoid using any explicit wait, but I've ran out of ideas.