【问题标题】:Appium negative test caseAppium阴性测试用例
【发布时间】:2018-05-01 03:26:15
【问题描述】:

我正在尝试通过 Appium 为 Android 应用程序测试一个否定案例。在登录不成功时,它会显示一条 toast 消息,需要断言 toast 值/消息。我怎样才能做到这一点?

【问题讨论】:

    标签: android testing automation appium-android


    【解决方案1】:

    UIAutomator2 支持查找 toast 消息,因此您需要将其设置为所需的功能,例如:

    automationName:UIAutomator2

    然后您可以像搜索任何其他元素一样搜索它。如果您使用的是 java-client,则示例为 here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-24
      • 1970-01-01
      • 2020-06-04
      • 2018-04-15
      • 2016-05-16
      • 2021-09-10
      相关资源
      最近更新 更多