UIAutomator和UIAutomator2有什么区别?我为什么要切换到UIAutomator2?

时间:2018-05-01 03:11:05

标签: appium uiautomator

我目前正在使用UIAutomator2,但我不确定它在UIAutomator之上提供了哪些其他功能。我正在使用Appium和UIAutomator2并且没有遇到任何挑战,但是想要利用UIAutomator2中引入的一些新功能,如果有的话。

1 个答案:

答案 0 :(得分:2)

UiAutomator2是Appium社区的Google UiAutomator的自定义实现,它主要修复原始UiAutomator中的现有问题,并稳定/加速与UI元素的交互:来自我自己的运行Android 6 / UiAutomator 2的测量测试平均 20 -30%比Android 5.1 / UiAutomator上相同的更快

Android 6开始 Appium仅支持 UiAutomator2 ,所以基本上没有选择与旧的片状UiAutomator和社区不支持它,所以如果smth没有&# 39;使用UiAutomator - >由你来解决它。

实际上没有太多自定义功能,但您可以尝试使用some of capabilities并确保阅读app release notes,因为它们通常会在最近的UiAutomator2版本中显示新内容,例如: {{1}}