gpt4 book ai didi

android - 葫芦-android : interact with status bar

转载 作者:行者123 更新时间:2023-11-29 17:54:36 25 4
gpt4 key购买 nike

我想编写一个测试来检测状态栏中是否显示带有特定文本的通知。到目前为止,我尝试使用 swipe 操作来拉下通知抽屉。遗憾的是,滑动只能左右滑动,不能向下滑动。我还尝试使用 drag 操作来下拉通知抽屉。

最佳答案

我需要做这样的事情。在这种情况下,我在 Appboy 中发送一个 PUSH 通知,并想检查我们是否收到了它。首先,我创建了一条独特的消息,以免与其他消息混淆:

unique = Time.now.to_i
push_automation_message = "PUSH Automation Msg: #{unique}"

然后...

Then(/^I will see the push notification on Android$/) do
output = `adb shell dumpsys notification` # dumps information about the status of the notification system service
expect(output).to include push_automation_message
end

这个解决方案并不理想,但它是一个 MVP,直到我有工具来检查 UI。

关于android - 葫芦-android : interact with status bar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20355751/

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