Need to get value using getText for other languages | Selenium Forum
A
Aditya Moghe Posted on 20/04/2019

I am working on new application in which I need to make demo for client using TestNG. The flow is simple where I have to compare few values on webpage with excel sheet. The problem I am facing is that the application is in Japanese. When I use getText() for any element, it prints either 'null' or '??????'. But when the any element isin English, then its working fine. Is there any way to get text of element in a string which is in Japanese language?


A
Ashish Thakur Replied on 22/04/2019

Its not issue with selenium. Its something to do with eclipse encoding.

Please refer: https://stackoverflow.com/questions/200691/how-to-use-special-chars-in-java-eclipse


A
Aditya Moghe Replied on 21/05/2019

Hi,

I have tried this again. Set the encoding to UTF-8, but still getting '??????' through getText. I have also observed that this happens only in TestNG flows. I had couple flows I scripted for practice without using TestNG, and Japanese letters are getting dispalyed in that code. Encoding is set to UTF-8 in that case as well.


A
Ashish Thakur Replied on 23/05/2019

Try using latest version of TestNG