常规运行UiAutomator的方法:
adb shell uiautomator runtest UiAutomatorjar.jar -c cn.nubia.something.ConfiguratorTest
传值方法:
adb shell uiautomator runtest UiAutomatorjar.jar -c cn.nubia.something.ConfiguratorTest -e Name Jason
传递过来的键值对,在UiAutomator中可以通过Bundle获取到这个值
System.out.println("getParamsBundle.getString(\"Name\"):"
+ getParamsBundle.getString("Name"));
输出:
getParamsBundle.getString("Name"):Jason