Home > Software engineering >  getText and getAttribute printing unrecognized characters on changing the user
getText and getAttribute printing unrecognized characters on changing the user

Time:05-23

I am using Selenium 2.53 with Chromedriver 2.43.600233 and Chrome 69.0.3497.128 to test a web application. I am using getText and getAttribute functions to print the text of my objects and had no issues. I only started switching the user I am using to run the tests without changing anything else when I started to get failures because of tests miscomparisons

< User’s Manual
---
> User?s Manual

< <b>Alpha</b> : −6.0000000000<br>
---
> <b>Alpha</b> : ?6.0000000000<br>

< In member function ‘virtual void...
---
> In member function 'virtual void...

Opening the application using that other account I found that the application is displaying the same characters as it was with my account. I am not sure why Selenium's functions output changed.

CodePudding user response:

Just contacted a QA guru and he proposed that the LANG environment variable is what's causing the issue. Setting LANG to en_US.UTF-8 instead of C fixed the issue.

  • Related