public void testAppByName(String appName) throws UiObjectNotFoundException {
screenUnlocker();
// String appName = "Clock";
UiObject allAppsButton = new UiObject(
new UiSelector().description("Apps"));
allAppsButton.clickAndWaitForNewWindow();
UiObject appsTab = new UiObject(new UiSelector().text("Apps"));
appsTab.click();
UiScrollable appViews = new UiScrollable(
new UiSelector().scrollable(true));
UiObject appLaunch = appViews.getChildByText(new UiSelector()
.className(android.widget.TextView.class.getName()), appName);
appLaunch.clickAndWaitForNewWindow();
}
如何使用 uiautomator runtest 命令为方法提供值 我尝试执行以下命令 adb shell uiautomator >runtest LaunchAppByName.jar -c >com.motorola.launchappbyname.LaunchAppByName#testAppByName -e String Clock 我收到错误 it.framework.AssertionFailedError :找不到方法“testAppByName”