Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我看到你可以通过 ios 中的 alertview 查询,但是你如何在 calabash android 中查询警报?
我想验证此警报是否存在,我可以这样做element_exists()吗?
element_exists()
它可以像这样执行:
wait_for_text("Notification message to be verified", timeout: 30)
这是部分服务于目的的替代方式。
我很久以前就使用过葫芦,所以,我不确定葫芦是否定义了一个检查警报是否显示的步骤。但是,我认为您可以执行一个简单的步骤,尝试检查文本(对话框标题、对话框内容...)或对话框按钮(确定、取消...)是否存在警报。希望这些提示对您有所帮助。