*Summary
When running Katalon with other keyboard language set than EN, STRINGS are interpreted which in my opinion should NEVER happen!
*Steps to reproduce
Set keyboard language to DE
Create stings (directly in code, as GlobalVariable, as bound variable,…) like qwerty, qwertz, zzzz, yyyy
Bring string to input filed via setText and sendKeys methods:
//SEND KEYS
def TO_EditUsername = findWindowsObject('Betaversion_AndTryOut/Login/Edit_Username')
//runtime: ayertz
Windows.sendKeys(TO_EditUsername, Keys.chord("a", "z", "e", "r", "t", "y"))
//string in (global or local) variable = qwerty, typed in text = qwerz
Windows.sendKeys(TO_EditUsername, Keys.chord(GlobalVariable.USERNAME_ALLROLES_CORRECT))
//runtime: "yyyy, zzzz"
String username2 = "zzzz, yyyy"
Windows.sendKeys(TO_EditUsername, username2, FailureHandling.CONTINUE_ON_FAILURE)
//SET TEXT
//string in (global or local) variable = qwerty, typed in text = qwerz
Windows.setText(TO_EditUsername, GlobalVariable.USERNAME_ALLROLES_CORRECT, FailureHandling.CONTINUE_ON_FAILURE)
Windows.setText(TO_EditUsername, "querty", FailureHandling.CONTINUE_ON_FAILURE)
//runtime: "yyyy, zzzz"
String username1 = "zzzz, yyyy"
Windows.setText(TO_EditUsername, username1, FailureHandling.CONTINUE_ON_FAILURE)
*Expected Results
A String is a String, what ever is TYPED into the variable is sent in runtime exactly as it was typed and stored. Whatever I write into a string should NEVER be manipulated by ANY outside settings. A string is a string is a string!
*Actual Results
This only works if the keyboard language is set ti EN, no matter what was written to the variable.
Hi @Elly_Tran ! Thank you for your answer.
It does not explain why a character stored in a variable is interpreted incorrectly at runtime. If I write a Z in a variable, it must remain a Z. The KeyStroke plays no role here. Or SHOULD not play a role here.
a colleague find a pretty good workaround, Use the Clipboard and past it into the element using keys (you still have to be sure of what is V) look like that, and it works