I try to use WinAppDriver for my UI test. Sendkeys() sends QWERTY txt, while I use AZERTY layout.
I manage to relace characters this way but it doesn't work for numbers:
public static async Task<WindowsElement> SendKeyAndWait(this WindowsElement element, string azertyText, int secondsToWaitAfter = 0, int secondsToWaitFirst = 1)
{
await element.ClickAndWait(secondsToWaitFirst);
element.SendKeys(azertyText
.Replace("a", "q")
.Replace("m", ";")
.Replace("z", "w")
.Replace(",", "m") //WinAppDriver ne connait que le clavier qwerty donc q => a
.Replace("1", "&") //semble ne pas fonctionner pour les chiffres
.Replace("0", "à")
);
await Task.Delay(secondsToWaitAfter);
return element;
}
Has anyone already solved this issue ?
Thanks for your answers