【发布时间】:2014-02-09 08:51:37
【问题描述】:
在 iOS 7 之后,我们遇到了使用葫芦进行 UIAlertView 验证的问题。
现在我可以使用
检测警报消息wait_for_elements_exist(["view:'_UIModalItemRepresentationView'"], :timeout => 20)
query("view:'_UIModalItemRepresentationView' label marked:'#{text}'",).empty?
我的想法来自https://gist.github.com/seanoshea/7613671
但之前(在 iOS 6 中)我们能够像这样清楚地检测到消息和标题
title = query("view:'UIAlertView'",:title).first
msg = query("view:'UIAlertView'",:message).first
有什么方法可以在 iOS7 中做同样的事情吗?我认为“坦率”的人也会这样做https://github.com/moredip/Frank/pull/262。
注意:jmoody 请帮助我们处理 Calabash 自动化中的 iOS 7 警报。
【问题讨论】:
-
我们知道这个问题。这是(我们相信)UIAutomation 中的一个错误。 github.com/calabash/calabash-ios/issues/215我们建议您归档雷达。与此同时,Chathura Palihakkara 发布的代码似乎可以解决。尽管他在 ruby 中的 CamelCase 得到了 -1... ;)
-
对不起 CamelCase。这是我第一次见到红宝石 :) .
标签: ios ios7 uialertview functional-testing calabash