Sha256: 9b4df5eeda9b4a447da0983a9f83e9689555d4f3ac185fb459668812045b03f7

Contents?: true

Size: 814 Bytes

Versions: 18

Compression:

Stored size: 814 Bytes

Contents

# rake android['android/element/text']
describe 'android/element/text' do
  def must_raise_no_element
    proc { yield }.must_raise Selenium::WebDriver::Error::NoSuchElementError
  end

  t 'text' do
    wait { text(1).text.must_equal 'API Demos' }
    wait { text('mos').text.must_equal 'API Demos' }
  end

  t 'texts' do
    wait { texts('i').length.must_equal 7 }
    wait { texts.length.must_equal 13 }
  end

  t 'first_text' do
    wait { first_text.text.must_equal 'API Demos' }
  end

  t 'last_text' do
    wait { last_text.text.must_equal 'Views' }
  end

  t 'text_exact' do
    must_raise_no_element { text_exact 'mos' }

    # should pass
    wait { text_exact('API Demos').text.must_equal 'API Demos' }
  end

  t 'texts_exact' do
    wait { texts_exact('API Demos').length.must_equal 1 }
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

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