gpt4 book ai didi

Android Espresso - 如何检查 EditText 提示?

转载 作者:IT老高 更新时间:2023-10-28 23:02:09 25 4
gpt4 key购买 nike

我开始玩 Espresso,开始进行基本测试。现在想弄清楚如何检查我的编辑文本是否有特定的提示文本?谢谢。

onView(withId(R.id.locationInput)).check(matches...?)

最佳答案

自从 Espresso 2.0只需使用内部 ViewMatcher withHint:

onView(withId(R.id.locationInput)).check(matches(withHint("your_hint")))

关于Android Espresso - 如何检查 EditText 提示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20334455/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com