ios_tests/lib/common.rb in appium_lib-6.0.0 vs ios_tests/lib/common.rb in appium_lib-7.0.0
- old
+ new
@@ -1,9 +1,9 @@
# common methods
-def back_click(opts={})
- opts ||= {}
+def back_click(opts = {})
+ opts ||= {}
search_wait = opts.fetch(:wait, 60 * 1.7)
# iOS may have multiple 'back' buttons
# select the first displayed? back button.
wait(search_wait) do
button_exact('Back').click
@@ -15,16 +15,20 @@
screen.must_equal catalog
end
def go_to_textfields
screen.must_equal catalog
- wait_true { text('textfield').click; screen == 'TextFields' } # wait for screen transition
+ wait_true do
+ text('textfield').click
+ screen == 'TextFields' # wait for screen transition
+ end
+
screen.must_equal 'TextFields'
end
def screen
$driver.find_element(:class, 'UIANavigationBar').name
end
def catalog
'UICatalog'
-end
\ No newline at end of file
+end