In StackOverflow, there is already a similar post about this topic. Though the OP of the post answered stating that "this is a bug in Windows" and that "I did not find a solution, I just cut part of my code out".
I have a slightly different circumstance. I cannot cut the part of the code out but I can use different web browsers.
My Circumstance:
I need to write a specific text into a text box. Unfortunately, the text I am writing includes few instances of emojis, thus send_keys()
was not an option. Instead, with the help of StackOverflow, I end up using pyperclip.copy(text)
and element.send_keys(Keys.CONTROL,'v')
which works fine (it successfully copied the emojis).
But I also need the ChromeDriver to be --headless
. Everything worked well, except for the copy-paste part.
My question
My question is: how should I tackle this issue?
- Web browser must be hidden (ex.
--headless
at ChromeDriver) - it can write emojis into a text element
- has to work on Windows OS (Windows 7 - 10)