Saved strings ("querty") change value in runtime, according to set keyboard language

*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.

*Screenshots / Videos


*Operating System
Windows 10

*Katalon Studio version
e.g. version 9.5.0

2 Likes

Hi @veroS,

Thank you for letting us know about this. I will create the ticket for our team to investigate and update with you soon

Hi @veroS,

I got the answer from my team that the limitation of WinAppDriver is that it only supports the English keyboard layout: sendKeys applies QWERTY-Style on German Keyboard Setting · Issue #446 · microsoft/WinAppDriver · GitHub.

Hope this can be clear to you.

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.

@veroS

I think that the GitHub issue which @Elly_Tran shared above does explain why.

If you would like, you can contribute to the WinAppDriver project for the issue sendKeys applies QWERTY-Style on German Keyboard Setting · Issue #446 · microsoft/WinAppDriver · GitHub


In the sendKeys applies QWERTY-Style on German Keyboard Setting · Issue #446 · microsoft/WinAppDriver · GitHub, 16 July 2024, raphaelAlma posted

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

System.Windows.Forms.Clipboard.SetText("mytext");    
windowsElement.SendKeys(Keys.LeftControl + "v");  

This might work, though I haven’t tried the idea