Sha256: 2a73767ce0cf1bc3a6f287931abe6c6460ba0247b5c0c34fb5eda90ab57d766a

Contents?: true

Size: 884 Bytes

Versions: 1

Compression:

Stored size: 884 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 's_text' do
    wait { s_text(1).text.must_equal 'API Demos' }
    wait { s_text('mos').text.must_equal 'API Demos' }
  end

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

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

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

  t 's_text_exact' do
    must_raise_no_element { s_text_exact 'mos' }

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

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

  t 'e_s_texts' do
    wait { e_s_texts.length.must_equal 14 }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appium_lib-1.0.0 android_tests/lib/android/specs/android/element/text.rb