0
I’m with an automatic messaging project via Whatsapp that consists of sending messages provided with special characters (emojis and other symbols) saved in files . txt, however, whenever I use the following code:
Trava = open('c:/Users/Marco Neto/Desktop/ataquepalhaco.txt', encoding='utf-8').read()
(...)
self.driver = webdriver.Chrome(executable_path=r'./chromedriver.exe')
He makes the following mistake:
selenium.common.exceptions.WebDriverException: Message: unknown error: ChromeDriver only supports characters in the BMP
I have already searched for, however, the only solution I found regarding this problem was to change webdriver and, instead of using Chrome, use Firefox. I tried through the following code but unfortunately also went wrong:
self.driver = webdriver.Firefox(executable_path=r'./geckodriver.exe')
Code error above:
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
In short, I would like an alternative or resolution to the codes so I can insert special characters in a file. txt and send it by Whatsapp by Lenium.
It is very difficult to reproduce the error with the information you have passed on. It is no longer easy for you to use key strings in your txt and have Selenium search for the item in the emoticons tab?
– Gabriel Faggione