??????Appium Android Uiautomator?У?????????????δ?????????δ????л???Appium??????????????飬???????Uiautomator?????setText????????????????????????????Uiautomator????????????????? ???????????????Uiautomator???????????????????Google??????????????????uiautomator-unicode-input-helper???????????????????????????????????????????????????????????????ò??????????????????????????????????
????????????Uiautomator?????????????????????Android?????????Uiautomator?????е??????????UiAutomatorBridge?????????UiAutomatorBridge??????????????????????InteractionController???????????InteractionController????????????setText???????????£?
????Java
public boolean More ...sendText(String text) {
if (DEBUG) {
Log.d(LOG_TAG?? "sendText (" + text + ")");
}
mUiAutomatorBridge.setOperationTime();
KeyEvent[] events = mKeyCharacterMap.getEvents(text.toCharArray());
if (events != null) {
for (KeyEvent event2 : events) {
// We have to change the time of an event before injecting it because
// all KeyEvents returned by KeyCharacterMap.getEvents() have the same
// time stamp and the system rejects too old events. Hence?? it is
// possible for an event to become stale before it is injected if it
// takes too long to inject the preceding ones.
KeyEvent event = KeyEvent.changeTimeRepeat(event2??
SystemClock.uptimeMillis()?? 0);
if (!injectEventSync(event)) {
return false;
}
}
}
return true;
}
?????????δ????????????????Android??Uiautomator?????м?????????????????????????????????????????????????
????Appium Android Uiautomator ??????????????к???????·??????