1

When we try and enter below text on web via browserstack it converts the characters:

"chineseSampleQuery": "我想为我的儿子购买平板电脑",
"koreanSampleQuery": "아들을 위해 태블릿을 사고 싶어요",
"arabicSampleQuery": "أريد أن أشتري لوحاً لابني",

E.g: when entered "Ä ä Ö ö Ü ü ẞ ß" it converts as "Ä ä Ö ö Ü ü ẞ ß" while entering to input filed. I've tried 2 ways:

any suggestion how to achieve this? Screenshot of how it's converted'Ä ä Ö ö Ü ü ẞ ß'(https://i.stack.imgur.com/UBUb7.png)

1.

String text = "이 사이트에서 태블릿을 구입할 수 있습니까?";
byte[] utf8Bytes = text.getBytes("UTF-8"); // Replace with the appropriate encoding

driver.findElement(By.id("yourInputField")).sendKeys(new String(utf8Bytes, "UTF-8"));
String koreanText = "\uC774 \uC0AC\uC774\uD2B8\uC5D0\uC11C \uD0C0\uC785\uB9CC \uAD6C\uC785\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4?";

Both did not work.

Yaroslavm
  • 1,762
  • 2
  • 7
  • 15
  • Hi there, Could you Add the IDE specs as well as the Selenium version you are using? Also, is this occurring only on some browser+OS combination? – Tony_Stark Aug 23 '23 at 13:07
  • Hello , Using IntelliJ IDEA 2023.1.2 (Community Edition), Selenium-v4.8.1 and there are multiple browsers used for this testing. 1. "browserName": "Chrome","deviceName": "OnePlus 9","osVersion": "11.0", 2. "browserName" :"Chrome","browserVersion" : "114","os": "windows", 3. "browserName": "Safari","deviceName": "iPhone 14","osVersion": "16.3". Also Firefox, edge safari browsers. On all I'm facing this issue. – krupa deshmukh Aug 24 '23 at 04:43

0 Answers0