I'm trying to get a text from Google Sheets, which is encoded in UTF-8, and copy it into any text field web element, but selenium throws an error when I try to send_keys to the text field.
I've tried not encoding the UTF-8 text and encoding it and in both situations, I get an error.
post description = 'Science! ✨' # (just an example)
post_description = post_description.encode('utf-8')
driver.get("https://www.editpad.org/")
time.sleep(10)
inputElement = driver.find_element_by_css_selector("#text")
inputElement.send_keys(post_description)
Here's what I get with the encoding:
UnicodeDecodeError: 'utf8' codec can't decode byte 0xf0 in position 0: unexpected end of data
Here's what I get without the encoding:
selenium.common.exceptions.WebDriverException: Message: missing command parameters
I've researched this a lot and can't seem to find an obvious solution to copy-pasting utf-8 text from a source to another.
Any ideas?