0

I try to do some web automation with Selenium.

My program was working good until I upgrade my packages - Now the send_keys() don't work on linux but it do well on Windows with the same versions.

I tried to 1 click(), 2 clear(), 3 send_keys() - copy/pasting, etc...

But none of these make the javascript input saving my send_keys(string). It do send the keys, but after he goes to next action, string has gone... And there's no error in console neither in logs.

I also tried with selenium 4.1.3 but it don't change anything...

It work perfectly under windows with/out headless, but it has stop working on Debian 11 Rolling after an update...

Please give me hint it's very important !!

Selenium version 3.141.0

Chrome version 100.0.4896.88-1

Python version 3.9.12

Kernel version 5.16.0

HSMKU
  • 81
  • 10

1 Answers1

0

Don't just find_element() to invoke send_keys(string).

Ideally, you need to induce WebDriverWait for the element_to_be_clickable() and you can use either of the following solution:

element = WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "element_css")))
element.click()
element.clear()
element.send_keys("HSMKU")
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • It's already what I did, as I explained. The script work perfectly under windows but don't under linux... I introduce a WebDriverWait, I even have a customDOMwaiter that wait for element event we want to do incase the DOM event load is delayed... I don't understand :( !!! – HSMKU Apr 13 '22 at 09:34