I'm new to Selenium Automation Testing. While exploring Amazon Website, there's change language preferences. How to manage these Language setting preferences in amazon website for automated testing in Project Setup using Selenium with TestNG Framework?


New contributor
Praneetha Kethireddy is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • 1
    What have you tried? It's better to post a specific problem you want to solve. – pavelsaman Nov 20 at 22:42

This works as same as English :


    String value = driver.findElement(By.xpath("//*[text()='ಅನುವಾದ']")).getText();

Hi you could try converting the local text to Unicode values first, use the below website to do that:


So the unicode character for :

ಅನುವಾದ is


Now use that value in your xpath:

String a=driver.findElement(By.xpath("//*[text()='\u0c85\u0ca8\u0cc1\u0cb5\u0cbe\u0ca6']")).getText();
| improve this answer | |
  • Searching by text on the full page is incredably unreliable, since unrelated changes will affect your code. – João Farias Nov 21 at 20:10
  • How will it affect the code if text never changes ? The intension of answer was the approach for test validation is same like you do normally – PDHide Nov 21 at 20:37
  • If ಅನುವಾದ happens anywhere on the DOM tree search before the radio buttons, you would be fetching the wrong sub-tree. – João Farias Nov 21 at 20:39
  • Ya that was an example stating you can use locale text for assertions and for xpath – PDHide Nov 21 at 21:21

Your Answer

Praneetha Kethireddy is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.