ios_tests/lib/ios/specs/ios/element/alert.rb in appium_lib-1.0.0 vs ios_tests/lib/ios/specs/ios/element/alert.rb in appium_lib-2.0.0
- old
+ new
@@ -1,18 +1,18 @@
# rake ios[ios/element/alert]
describe 'ios/element/alert' do
def nav_once
screen.must_equal catalog
- wait_true { s_text('alerts').click; tag('UIANavigationBar').name == 'Alerts' } # wait for true
+ wait_true { text('alerts').click; tag('UIANavigationBar').name == 'Alerts' } # wait for true
tag('UIANavigationBar').name.must_equal 'Alerts'
# redefine method as no-op after it's invoked once
self.class.send :define_method, :nav_once, proc {}
end
def after_last
- alert_accept if exists { s_text('UIActionSheet <title>') }
+ alert_accept if exists { text('UIActionSheet <title>') }
back_click
screen.must_equal catalog
sleep 1
end
@@ -21,12 +21,12 @@
open_alert
end
def open_alert
wait_true do
- return true if exists { s_text('UIActionSheet <title>') }
- s_text('Show OK-Cancel').click
- s_text('UIActionSheet <title>').displayed?
+ return true if exists { text('UIActionSheet <title>') }
+ text('Show OK-Cancel').click
+ text('UIActionSheet <title>').displayed?
end
end
# iOS 7 is not using the alert methods. alert is nil.
def ios7_alert_detected
\ No newline at end of file