0

我是使用 UIAutomator 2 进行 android 测试的新手,我想使用 UIScrollable 类,但这个类在 android.support 包中。我找不到任何可以添加到 pom 以导入类的依赖项。

4

1 回答 1

1

实际上它要简单得多。

您不必在项目中添加任何依赖项作为其在 appium 依赖项中的内置,只需将automationName功能设置为UiAutomator2并且 appium 将使用 UiAutomator2 服务器 + 客户端来运行您的测试。

    driver.findElementByAndroidUIAutomator("new UiScrollable(new UiSelector())
 .scrollIntoView(new UiSelector().text(\"Radio Group\"));"));

基本上与默认的 UiAutomator 相同。

于 2017-12-20T19:56:42.900 回答