-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Description
🐛 Bug Report
Problem is described in detail here https://stackoverflow.com/questions/56880164/selenium-parsing-unicode-problem-webdriverexception-message-unknown-error-ba?noredirect=1#comment100310339_56880164
Basically the problem is Selenium can't parse the HTML or text of the elements because the elements are invalid unicode characters.
I get the same error using any of: driver.page_source, element.text, element.get_attribute('innerHTML')
Error looks like
WebDriverException: Message: unknown error: bad inspector message: {"id":327,"result":{"result":{"type":"object","value":{"status":0,"value":"<a class="influencer-analytics-link" href="/influencers/lebelletour">
Belle Nog\uD83D\uDC83\uD83C\uDFFC\u2708\uFE0F\uD83C\uDDE7\uD83C\uDDF7\uD83C\uDDEA\uD83C\uDDF8\uD83C\uDDFA\uD83C...
"}}}}(Session info: chrome=75.0.3770.100)
(Driver info: chromedriver=2.40.565386 (45a059dc425e08165f9a10324bd1380cc13ca363),platform=Mac OS X 10.14.0 x86_64)
The offending characters are somewhere around "\uD83C\uDDF7\uD83C"
You can see at https://ibb.co/HtkzzPM the screen shot where the unicode characters (emojis) aren't rendering. The "U" and the "?" are actually flag emojis.
To Reproduce
It's hard to tell you how to reproduce because the page is behind a paywall