Sha256: 0588ea0a47942f946dcc22122b270d164aeaf5844036bb470720dac1a854dab7

Contents?: true

Size: 827 Bytes

Versions: 10

Compression:

Stored size: 827 Bytes

Contents

# rake android['android/element/text']
describe 'android/element/text' do
  def must_raise_no_element(&block)
    proc { block.call }.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

10 entries across 10 versions & 1 rubygems

Version Path
appium_lib-9.1.1 android_tests/lib/android/specs/android/element/text.rb
appium_lib-9.1.0 android_tests/lib/android/specs/android/element/text.rb
appium_lib-9.0.0 android_tests/lib/android/specs/android/element/text.rb
appium_lib-8.2.1 android_tests/lib/android/specs/android/element/text.rb
appium_lib-8.2.0 android_tests/lib/android/specs/android/element/text.rb
appium_lib-8.1.0 android_tests/lib/android/specs/android/element/text.rb
appium_lib-8.0.2 android_tests/lib/android/specs/android/element/text.rb
appium_lib-8.0.1 android_tests/lib/android/specs/android/element/text.rb
appium_lib-8.0.0 android_tests/lib/android/specs/android/element/text.rb
appium_lib-7.0.0 android_tests/lib/android/specs/android/element/text.rb