How could I using unicodeKeyboard to input sentences.
With appium, I can using unicodeKeyboard to type and send Chinese sentences, like below, but I'm not sure AndroidViewClient has similar function
desired_caps["unicodeKeyboard"] = True desired_caps["resetKeyboard"] = True driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps) driver.find_element_by_id("id/text_input").send_keys(question)
I'm not sure about your intentions, but I understand you want to enter Chinese text into an EditText or something like that.
As an example, I'm using Calendar and creating a Reminder.

you can enter unicode text and then the corresponding code will be generated.

You need AndroidViewClient >= 15.2.1 for this to work correctly.
The generated line in this case is
self.vc.uiAutomatorHelper.findObject(
bySelector='[email protected]:id/title_edit_text,[email protected],text@$Remind me to…,[email protected]')
.setText("提醒我包括中文支持")
Very thanks, it's do a solution to input Chinese text ! However, as I can't using uiAutomatorHelper (Culebra Tester always show "Instrumentation not installed" on the bottom, although I have already installed the Instrumentation), I'm now using viewserver, and detect the input element via findViewByIdOrRaise, then using type method to enter Chinese as below, but it doesn't work, have you any ideas? This method seems only support English.
editE = vc.findViewByIdOrRaise("id/EditText_id") editE.type(u"中文")
I'm very sorry for boring you so much. As I'm a ML algorithm Eng. and know almost nothing about Android, but my leader give me this task for the staff shortage problem in our team.
Culebra Tester always show "Instrumentation not installed" on the bottom, although I have already installed the Instrumentation)
Are you 100% sure you have both APKs installed? As described at https://github.com/dtmilano/CulebraTester-public/wiki/Getting-started.
If so, and still detecting "Instrummentation not installed", can you please provide logcat so we can determine the problem.
ViewServer is very old an a lot of things won't be supported. In such cases AdbClient gives
warnings.warn(u"WARNING: 'input text' utility does not support unicode: %s" % text)
when unicode text is detected in an argument.
The limitation is in the underlyig utility input text, so the solution is outside AndroidViewClient/culebra.
My recommentdation: stick to uiAutomatorHelper which is the best option by far.
'm very sorry for boring you so much. As I'm a ML algorithm Eng. and know almost nothing about Android, but my leader give me this task for the staff shortage problem in our team.
Hope you enjoy the ride. You'll be glad to hear then, that shortly, CulebraTester will "learn" how to test Android apps automatically, most like concertina mode but AI based.