如何在eclipse中的maven项目中使用UI Automator类?

问题描述 投票:0回答:1

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

appium appium-android
1个回答
1
投票

实际上它简单得多。

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

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

与默认的UiAutomator基本相同。

© www.soinside.com 2019 - 2024. All rights reserved.