[英]Espresso swipeUp(), swipeDown() etc. No longer working on API 33+ (Android 13)
So I am running instrumented tests with my app targeting API 33 (Android 13).因此,我正在使用我的应用程序针对 API 33 (Android 13) 运行仪器测试。 I noticed some tests were failing due to the espresso swipe functions not doing their job.
我注意到一些测试失败是因为浓缩咖啡刷卡功能没有发挥作用。
onView(withId(android.R.id.content)).perform(swipeUp())
The test does not fail on this call, but later because my test depends on the action to evaluate the UI.这次调用测试没有失败,但后来因为我的测试依赖于评估 UI 的操作。
For reference, this is the code in the Espresso swipeUp function:作为参考,这是 Espresso swipeUp function 中的代码:
public static ViewAction swipeUp() {
return actionWithAssertions(
new GeneralSwipeAction(
Swipe.FAST,
GeneralLocation.translate(GeneralLocation.BOTTOM_CENTER, 0, -EDGE_FUZZ_FACTOR),
GeneralLocation.TOP_CENTER,
Press.FINGER));
} }
I am using Espresso 3.3.0.我正在使用 Espresso 3.3.0。 Everything works fine until testing on an API 33 emulator.
一切正常,直到在 API 33 模拟器上进行测试。
Has anyone else had this problem, and if not is there a workaround?有没有其他人遇到过这个问题,如果没有,是否有解决方法?
Latest regular version of espresso (3.5.0) has fixed this bug and currently, I don't have any other issues.最新的普通版 espresso (3.5.0) 已经修复了这个错误,目前,我没有任何其他问题。
I've bumped espresso version to the latest alpha version ( 3.5.0-alpha07
) and seems like it fixed the issue我已经将 espresso 版本升级到最新的 alpha 版本(
3.5.0-alpha07
),似乎它解决了这个问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.