• 【uiautomator】Uiautomator API


    Uiautomator API 

    Uiautomator API被绑定在automator.jar文件中,automator.jar文件在<android-sdk>/platforms/dandroid-X(X≥16)目录下,API包括了主要的classes,interface和exceptions,这些帮助你捕获和处理目标APP的UI组件。 

    Classes类

    com.android.uiautomator.core.UiCollection

    用来枚举界面容器的界面元素,用来统计子元素数量,是文本、描述定位子元素 

    com.android.uiautomator.core.UiDevice

    对外提供访问设备状态信息的方法,能模拟用户在设备上的操作:方向键、Home键、菜单键等 

    com.android.uiautomator.core.UiObject

    代表界面元素 

    com.android.uiautomator.core.UiScrollable

    提供支持查询在可滑动的界面容器中的界面元素 

    com.android.uiautomator.core.UiSelector

    可在设备上查询到一个或者更多的UI元素

    Interfaces接口

    com.android.uiautomator.core.UiWatcher

    代表目标设备上的条件监听器 

    com.android.uiautomator.testrunner.IAutomationSupport

    给测试用例提供辅助支持 

    com.android.uiautomator.testrunner.UiAutomatorTestCase

    定义一个运行多个测试运行环境,所有的uiautomator测试用例必须继承这个接口

    Exceptions异常

    com.android.uiautomator.core.UiObjectNotFoundException

    当UiSelector无法匹配带任何UI元素时抛出异常

  • 相关阅读:
    Image Perimeters(图像周长)
    Power Strings(字符串的n次方)
    滑雪
    剪花布条
    SOJ题目分类
    Catch That Cow(捉住那头牛)
    Seek the Name, Seek the Fame(找名字,要成名)
    Avoid The Lakes(躲开湖水区)
    hash相关理论
    JAVASCRIPT共通関数数値チェック
  • 原文地址:https://www.cnblogs.com/wonderful0714/p/4578691.html
Copyright © 2020-2023  润新知