android – 点击浓缩咖啡中的FloatingActionButton

android – 点击浓缩咖啡中的FloatingActionButton,第1张

概述尝试在espresso测试中单击FloatingActionButton. onView(withId(R.id.actionButton)).perform(customClick()) 我的方法customClick: fun customClick(): ViewAction { return actionWithAssertions( CustomGener 尝试在espresso测试中单击floatingActionbutton.

onVIEw(withID(R.ID.actionbutton)).perform(customClick())

我的方法customClick:

fun customClick(): VIEwAction {    return actionWithAssertions(            CustomGeneralClickAction(Tap.SINGLE,GeneralLocation.VISIBLE_CENTER,Press.FINGER))}

还要创建具有一些更改的类CustomGeneralClickAction:

Matcher<VIEw> standardConstraint = isdisplayingAtLeast(60);

这个例子我从answer开始.
但有下一个错误:

androID.support.test.espresso.PerformException: Error performing ‘single click’ on vIEw ‘with ID: com.fentury.androID:ID/actionbutton’.

Caused by: androID.support.test.espresso.PerformException: Error performing ‘click (after 3 attempts)’ on vIEw ‘unkNown’.

还在这里:

at com.fentury.androID.acceptanceTests.utils.CustomGeneralClickAction.perform(CustomGeneralClickAction.java:79)

status = tapper.sendTap(uiController,coordinates,precision);
解决方法 它应该是onVIEw(withID(R.ID.floating_action_button)).perform(click()); 总结

以上是内存溢出为你收集整理的android – 点击浓缩咖啡中的FloatingActionButton全部内容,希望文章能够帮你解决android – 点击浓缩咖啡中的FloatingActionButton所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1125993.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存