Hi @be chan ,
Unfortunately, ChromeDriver (EdgeDriver) only supports characters in the BMP is a known issue, but till now the support for other characters has not been added yet.
However, you can use the following workaround to add emojis:
JS_ADD_TEXT_TO_INPUT = """
var elm = arguments[0], txt = arguments[1];
elm.value += txt;
elm.dispatchEvent(new Event('change'));
"""
driver = webdriver.Edge()
driver.get("https://google.com/")
elem = driver.find_element("xpath", "//textarea[@name='q']")
text = "🌎"
driver.execute_script(JS_ADD_TEXT_TO_INPUT, elem, text)
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best Regards,
Shijie Li