Sha256: 981c262cb30c6c872dc75c642c3d686bbe1964534a23a937cfb25a03d111f863

Contents?: true

Size: 1 KB

Versions: 28

Compression:

Stored size: 1 KB

Contents

# rake android[android/element/alert]
describe 'android/element/alert' do
  def open_alert
    # trigger the alert
    wait { button('OK Cancel dialog with a message').click }
  end

  t 'alert_click' do
    # nav to alert activity
    wait { find('app').click }
    wait { find('alert').click }

    # test
    wait { open_alert }
    wait { alert_click('OK') }
  end

  t 'alert_accept' do
    wait { open_alert }
    wait { alert_accept }
  end

  t 'alert_accept_text' do
    wait { open_alert }
    wait { alert_accept_text.must_equal 'OK' }
    wait { alert_accept }
  end

  t 'alert_dismiss' do
    wait { open_alert }
    wait { alert_dismiss }
  end

  t 'alert_dismiss_text' do
    wait { open_alert }

    # alert dialog button placement changed:
    # 'OK Cancel dialog with a long message'
    # Android L: 'Something, Cancel, Ok'
    # Android 19: 'Cancel, Something, Ok'

    wait { alert_dismiss_text.must_equal 'Cancel' }
    wait { alert_dismiss }

    # nav to start activity
    2.times { back }
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
appium_lib-9.4.5 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.4.4 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.4.3 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.4.2 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.4.1 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.4.0 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.3.8 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.3.7 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.3.6 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.3.5 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.3.4 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.3.3 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.3.2 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.3.1 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.3.0 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.2.0 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.1.3 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.1.2 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.1.1 android_tests/lib/android/specs/android/element/alert.rb
appium_lib-9.1.0 android_tests/lib/android/specs/android/element/alert.rb