becomes  in source code processed by Selenium

142 views
Skip to first unread message

Guillaume Lucazeau

unread,
Sep 3, 2013, 11:53:11 AM9/3/13
to seleniu...@googlegroups.com
Hello,

a few days ago a test started to fail because of what seems to be an encoding issue.

The test is looking for this string: "by bill  - Jan 26, 2012" using this method: boolean isPresent = selenium.isTextPresent(text);
The actual text that we see in the HTML captured by Selenium is:
        by 
        bill
         - Jan 26, 2012

We just switched from Remote Control to Webdriver and we will replace this isTextPresent with the proper way to check text with Webdriver. But we don't understand why the " " do not show up properly anymore, as we don't think we changed anything in the environment that could affect change this behaviour.

We're using Selenium Webdriver 2.35 with Firefox 23.0.1 on Debian Squeeze, the web application is running on Tomcat 6.0.37. It's using a VNC session to start Firefox. If I log in this VNC session while the test is running, and look up at the HTML source from the page checked by the test when it fails, I don't have this problem, I see " ".

Any help on this issue would be really appreciated, I have no idea what to do now. Feel free to ask any information I could have forgotten.

Thank you!
Guillaume

David Lai

unread,
Sep 4, 2013, 11:09:39 AM9/4/13
to seleniu...@googlegroups.com
Most likely an encoding thing.  File probably got switched from ascii or western iso to unicode.  I had that issue with Bamboo builds yesterday, where all the spaces got that accented A prepended to it.

Guillaume Lucazeau

unread,
Sep 11, 2013, 9:48:35 AM9/11/13
to seleniu...@googlegroups.com
Hi David,

thanks for replying, it was indeed an encoding issue, a missing parameter in the Tomcat configuration. We still see the  but no new line is added and Selenium doesn't complain anymore.

Thanks for helping!

Best regards,
Guillaume
Reply all
Reply to author
Forward
0 new messages