阿皮姆.移动应用自动化.等到 [英] Appium. Mobile App Automation. Wait until

查看:20
本文介绍了阿皮姆.移动应用自动化.等到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,请帮忙!

我不知道怎么做wait.until".

I don't know how to do "wait.until".

我将 Appium 与 UIAutomator 结合使用.

I'm using Appium with UIAutomator.

我的测试将等到新应用程序的页面加载并检查文本字段中的文本 1".

My test would wait until new app's page will loaded and 'Text 1' in text field will be checked.

我在 UIAutomator 中有这样的参数:

I have such parameters in UIAutomator:

text : Text 1;

recource-id: payment_content_title;

class: android.widget.TextView;

package: ru.mts.stm.mobilemts;

IntelliJ 说我的代码不正确:

IntelliJ says that my code is incorrect:

WebDriverWait wait;
    wait = new WebDriverWait(driver, 60);
    wait.until(ExpectedConditions.textToBe(new MobileBy.ByAndroidUIAutomator(text),"Text 1"));

谢谢

推荐答案

使用以下代码等待.

 WebDriverWait wait;
    wait.until(ExpectedConditions.presenceOfElementLocated(By.id("put id here")));

这篇关于阿皮姆.移动应用自动化.等到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆