1

I am making a code in Python 3.7 for testing an application in Appium.

I am trying to send a text in an input field of an application. The text is in French with special characters (é, è, à, etc.).

My code managed to type character by character, one by one, but when it arrives to a special character with accent "é", it bugs! Here is error message:

Encountered internal error running command: io.appium.uiautomator2.common.exceptions.InvalidArgumentException: KeyCharacterMap.getEvents is unable to synthesize KeyEvent sequence out of '233' key code. Consider applying a patch to UiAutomator2 server code or try to synthesize the necessary key event(s) for it manually

I read the doc and forum and I added this capability:

desired_caps['unicodeKeyboard'] ='true'

But it didn't change anything. I still have same issue.

double-beep
  • 5,031
  • 17
  • 33
  • 41
Gauthier Buttez
  • 1,005
  • 1
  • 16
  • 40

2 Answers2

0

Try sending keys like:

self.driver.find_element().send_keys(u'éèà')
double-beep
  • 5,031
  • 17
  • 33
  • 41
Mate Ajdukovic
  • 340
  • 3
  • 17
0

Change true to True desired_caps['unicodeKeyboard'] ='True'

And this might help you

http://appium.io/docs/en/writing-running-appium/other/unicode/

Nithin Mohan
  • 372
  • 1
  • 9