0

When I use send_keys(string) to web browser, it just types directly following my non-US keyboard.

For example, there was a string like Smart Factory 보고서 and I wanted to send the string to the web using send_keys()

Example code is below,

string_value = "Smart Factory 보고서"
elem.send_keys(string_value)

The problem is that it returns Smart Factory qhrhtj because typing of 보고서 is same as typing of qhrhtj

My explanation is bad.. but it really makes me crazy. Does anyone know how to solve it?

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

1 Answers1

0

Not sure about the specific type of these characters Smart Factory 보고서. However it seems some of them are special characters with a unicode after FFFF and using ChromeDriver /Chrome if you try to send those characters you can face an error as:

WebDriverException: Message: unknown error: ChromeDriver only supports characters in the BMP

You can find a detailed discussing in Chromedriver only supports characters in the BMP error while sending Emoji with ChromeDriver Chrome using Selenium Python to Tkinter's label() textbox


However using / combo and inducing WebDriverWait for the desired element_to_be_clickable() you can easily send the special characters following the solution:

string_value = "Smart Factory 보고서"
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "element_css_locator"))).send_keys(string_value)
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352