gpt4 book ai didi

java - Espresso : returning to application

转载 作者:太空宇宙 更新时间:2023-11-04 10:37:11 24 4
gpt4 key购买 nike

我在 Espresso 中进行了测试,在测试结束时,我按下应用程序中的通话按钮,这会导致手机的拨号屏幕。

如何返回应用程序?我想返回应用程序并从中注销。

pressBack(); 不执行任何操作。

如有建议,我们将不胜感激。

最佳答案

 UiDevice mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
mDevice.pressRecentApps();
mDevice.pressRecentApps();

我最终使用了UIAutomator。正是我所需要的。

关于java - Espresso : returning to application,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49340645/

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