gpt4 book ai didi

android - 我可以使用 Espresso 测试状态栏色调/颜色吗?

转载 作者:行者123 更新时间:2023-12-05 00:08:25 26 4
gpt4 key购买 nike

我想知道是否有一种方法可以测试在使用应用程序目标时显示的状态栏色调。我还没有找到与 Espresso 的状态栏相关的 UI 测试的任何信息。

enter image description here

最佳答案

现在这是不可能的。 Espresso 只能看到您的应用程序 View ,我的意思是它不适用于通知、共享 Intent 、状态栏等。

这是我对类似问题的回答:Espresso test for Notification to showing up

Espresso UI test framework doesn't see more than actual View. I doubt seriously that you can check any notification with Espresso.

For this purpose use another Googles testing framework uiautomator, which is described as:

UI Automator is a UI testing framework suitable for cross-app functional UI testing across system and installed apps.

在这里您可以找到如何将它与 Espresso 一起使用: http://qathread.blogspot.com/2015/05/espresso-uiautomator-perfect-tandem.html

更多信息:

另请访问: Android Testing: UIAutomator vs Espresso

检查 uiatomator 提供的方法。如果找不到它,请不要犹豫,在与它相关的 code.google.com 存储库上添加问题。

希望对您有所帮助。

关于android - 我可以使用 Espresso 测试状态栏色调/颜色吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38183251/

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