Sha256: 841b62ee9c207dbc1bf820c003694d97371daf1a50510d1ea6ff25922fa759cd

Contents?: true

Size: 1.25 KB

Versions: 17

Compression:

Stored size: 1.25 KB

Contents

describe 'android/element/textfield' do
  def must_raise_no_element
    proc { yield }.must_raise Selenium::WebDriver::Error::NoSuchElementError
  end

  def left
    'Left is best'
  end

  def right
    'Right is always right'
  end

  def before_first
    # nav to activity
    wait { find('app').click }
    wait { find('activity').click }
    wait { find('custom title').click }
  end

  def after_last
    # back to start
    3.times { back }
  end

  t { before_first }

  t 'textfield' do
    wait { textfield(1).text.must_equal left }
    wait { textfield('right').text.must_equal right }
  end

  t 'textfields' do
    wait { textfields('right').first.text.must_equal right }
    wait { textfields.length.must_equal 2 }
  end

  t 'first_textfield' do
    wait { first_textfield.text.must_equal left }
  end

  t 'last_textfield' do
    wait { last_textfield.text.must_equal right }
  end

  t 'textfield_exact' do
    must_raise_no_element { textfield_exact 'zz' }
    wait { textfield_exact(left).text.must_equal left }
  end

  t 'textfields_exact' do
    wait { textfields_exact('zz').must_equal [] }
    wait { textfields_exact(left).first.text.must_equal left }
  end

  t 'hide_keyboard' do
    first_textfield.click
    hide_keyboard
  end

  t { after_last }
end

Version data entries

17 entries across 17 versions & 1 rubygems

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