Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending message to contact or group which name contain emoji #58

Open
yashlande opened this issue Feb 19, 2020 · 2 comments
Open

Sending message to contact or group which name contain emoji #58

yashlande opened this issue Feb 19, 2020 · 2 comments
Labels
hacktoberfest help wanted Extra attention is needed

Comments

@yashlande
Copy link

yashlande commented Feb 19, 2020

I try this script and like and it is very good but I occur one issue ie if group name or contact name contain emoji or unicode character then script not find out contact. for e.g. I have one contact "🚩 जय शिवराय महाराष्ट्र 🚩, 🚩 King Group 🚩" this type of contact name not found by script and it is not possible to send message through script.

@shauryauppal
Copy link
Owner

Hi @yashlande chrome driver only supports BMP. I am not sure if this is possible to solve. https://stackoverflow.com/questions/59138825/chromedriver-only-supports-characters-in-the-bmp-error-while-sending-emoji-with

@shauryauppal shauryauppal added hacktoberfest help wanted Extra attention is needed labels Oct 3, 2020
@nitinkumar30
Copy link

Hi @yashlande chrome driver only supports BMP. I am not sure if this is possible to solve. https://stackoverflow.com/questions/59138825/chromedriver-only-supports-characters-in-the-bmp-error-while-sending-emoji-with

I think this can be implemented with some integration. Try to apply the following code. Avoid using send_keys.

js_code = """
  var elm = arguments[0], txt = arguments[1];
  elm.value += txt;
  elm.dispatchEvent(new Event('change'));
"""

your_text = '🚩 जय शिवराय महाराष्ट्र 🚩'
element = driver.find_element_by_xpath('//*[@data-testid="input"]')
driver.execute_script(js_code, element, your_text)

I got this answer here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants