Input Text keyword doesn't print UTF-8 Emoji characters

637 views
Skip to first unread message

Tarvo Himanen

unread,
Mar 18, 2015, 5:44:19 AM3/18/15
to robotframe...@googlegroups.com
I have a problem where I cannot add Emoji characters like '😢' to Input fields, because they are converted to '��' when using Input Text keyword.
Tested with following robotframework version:

robotframework (2.8.7)

robotframework-selenium2library (1.6.0)

selenium (2.45.0)


Does anyone know any workaround or can this be fixed by some configuration setting?

Tatu Aalto

unread,
Mar 19, 2015, 3:30:37 PM3/19/15
to tarvo.him...@gmail.com, robotframework-users

Ugh

Could you provide example, like inputting characters in a Google search field.

-Tatu
Send from my mobile

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

Tarvo Himanen

unread,
Mar 27, 2015, 4:16:02 AM3/27/15
to robotframe...@googlegroups.com, tarvo.him...@gmail.com
Hi, here is example testsuite file with firefox that is failing:

*** Settings ***
Library Selenium2Library 5 5

*** Variables ***
${COMMENT} Some input! öäå 😢

*** Test Cases ***
Test case firefox
Open Browser https://www.google.fi/?gws_rd=ssl firefox 
Input Text name=q ${COMMENT}
Page Should Contain ${COMMENT}

*** Keywords ***

Tatu Aalto

unread,
Apr 12, 2015, 2:23:26 PM4/12/15
to robotframe...@googlegroups.com
Ugh

Sorry for long delay in the answer, I did had a terrible flu and did took long time to recover.

But I can not repeat your problem, when I run your case it passes OK in my environment. The result from my run are in the attachment. The current version of Firefox (37.0.1) has again broke the compatibility with selenium, so I did run my test with chrome.  But that does not mean that it could not be a problem for you. To help you more, could you tell what version of selenium and selenium2library you are using and is it the java or python version of the libraries? Also running the test with trace level enabled and sending the log to us might reveal something. And telling your Python/Jython and robot framework version is useful too. And it might be browser specific (not likely but possible), so telling Firefox version is useful too and can you repeat the problem with other browsers?

Also if you test data contains special characters, you need to escape [1] those characters.

-Tatu
[1] http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#escaping
test.zip

Jake

unread,
Apr 29, 2015, 6:32:08 AM4/29/15
to robotframe...@googlegroups.com
Don't know if this helps, but maybe it works giving some idea to solve your problem. But We had problem with Scandinavic characters when reading to parameter from file.
problem was with characters like äöå

so this worked for us.
users name was set to NAME variable, example Päivi then it recoded as UTF-8 character(below)
${NAME}   Encode String toBytes ${NAME}   UTF-8
Reply all
Reply to author
Forward
0 new messages