I need send emoticons with selenium, for example:
���������✊🏿�🏿�🏿�🏼�🏻�����
and selenium returns an error, I tested with .send_keys(unicode(bio_text, 'ascii'))  # iso-8859-1, the same result.
How can I send these characters with python selenium?
python code:
driver.find_element_by_id("biography").clear()
driver.find_element_by_id("biography").send_keys(unicode('���������✊🏿�🏿�🏿�🏼�🏻�����', 'ascii'))  # iso-8859-1
emoticons example :
���������✊🏿�🏿�🏿�🏼�🏻�����
                Here is what i did.
# -*- coding: utf-8 -*-
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('https://google.com')
text = u"😀😁'😂'😇😺"
text = text.replace("'", "\\'")  # escape single quotes
text = text.encode('utf-8')  # needed to make format function work
driver.execute_script(
    "document.getElementById('lst-ib').value = '{data}'".format(
        data=text
    ))
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With