Sha256: 90eded69bf207f46eeed1ce2c3b6a32242d2716241fc457a37e99e4f12f54581

Contents?: true

Size: 1.09 KB

Versions: 9

Compression:

Stored size: 1.09 KB

Contents

# rake android['android/element/button']
describe 'android/element/button' do
  def before_first
    # nav to buttons activity
    wait { find('App').click }
    wait { find('Activity').click }
    wait { find('Animation').click }
  end

  def after_last
    # nav back to home activity
    3.times { back }
  end

  def fade_in
    'Fade in'
  end

  t { before_first }

  t 'button' do
    # by index
    2.times { wait { button(1).name.must_equal fade_in } }

    # by name contains
    wait { button('ade').name.must_equal fade_in }
  end

  t 'buttons' do
    exp = ['Zoom in', 'Modern zoom in', 'Thumbnail zoom']
    wait { buttons('zoom').map { |e| e.text }.must_equal exp }
    wait { buttons.length.must_equal 6 }
  end

  t 'first_button' do
    wait { first_button.name.must_equal fade_in }
  end

  t 'last_button' do
    wait { last_button.name.must_equal 'Thumbnail zoom' }
  end

  t 'button_exact' do
    wait { button_exact(fade_in).name.must_equal fade_in }
  end

  t 'buttons_exact' do
    2.times { wait { buttons_exact(fade_in).first.name.must_equal fade_in } }
  end

  t { after_last }
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
appium_lib-6.0.0 android_tests/lib/android/specs/android/element/button.rb
appium_lib-5.0.1 android_tests/lib/android/specs/android/element/button.rb
appium_lib-5.0.0 android_tests/lib/android/specs/android/element/button.rb
appium_lib-4.1.0 android_tests/lib/android/specs/android/element/button.rb
appium_lib-4.0.0 android_tests/lib/android/specs/android/element/button.rb
appium_lib-3.0.3 android_tests/lib/android/specs/android/element/button.rb
appium_lib-3.0.2 android_tests/lib/android/specs/android/element/button.rb
appium_lib-3.0.1 android_tests/lib/android/specs/android/element/button.rb
appium_lib-3.0.0 android_tests/lib/android/specs/android/element/button.rb