Python Selenium problem with sending emoji

32 Views Asked by At

I need help. I have a code in Python Selenium. My task is to send text with emoji in subject of letter in Proton Mail. I do it with JavaScript help, but the subject of the letter immediately disappears. In Gmail there wasn't such a problem. I'll show you part of the code and attach a video where you can see how it happens. I'll also show you how the subject of the letter looks.

Part of code:

JS_ADD_TEXT_TO_INPUT = """
  var elm = arguments[0], txt = arguments[1];
  elm.value += txt;
  elm.dispatchEvent(new Event('change'));
  """
driver.execute_script(JS_ADD_TEXT_TO_INPUT, subject_area, subject_text)

Example of subject with emoji: Publishing an article on

Link to the video: https://drive.google.com/file/d/12mHH7VPJTdx9Fc6kxnKgwMD7tO2PmeR7/view?usp=drive_link

0

There are 0 best solutions below