Sha256: d1a5b07ef4799098583626941405a5587537e568a3b7cac0629ca1893ff0b50b

Contents?: true

Size: 1.31 KB

Versions: 21

Compression:

Stored size: 1.31 KB

Contents

# rubocop:disable Lint/RescueException
# rubocop:disable Metrics/LineLength

#
#  Skip:
#    status # status patches are already tested in driver.rb
#    raw_execute # debug output for Pry
#

# rake ios[common/patch]
describe 'common/patch.rb' do
  def before_first
    screen.must_equal catalog
  end

  t 'before_first' do
    before_first
  end

  # Attributes are busted in Android.
  # Blocked on https://github.com/appium/appium/issues/628
  describe 'Selenium::WebDriver::Element methods' do
    # TODO: t 'value' do; end

    t 'name' do
      first_text.name.must_equal 'UICatalog'
    end

    # t 'tag_name' do; end # Doesn't work on Android

    t 'location_rel' do
      loc = first_text.location_rel
      loc.x.class.must_equal String
      loc.y.class.must_equal String
    end
  end

  describe 'common patch' do
    # By default, the webdriver gem will return message instead of origValue
    # {"message":"An unknown server-side error occurred while processing the command.","origValue":"Strategy id is not valid."}
    t 'error_message' do
      value = ''
      begin
        set_wait 0
        find_element(:css, 'ok')
      rescue Exception => e
        value = e.message
      ensure
        set_wait
      end
      value.must_equal "Locator Strategy 'css selector' is not supported for this session"
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
appium_lib-9.4.5 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.4.4 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.4.3 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.4.2 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.4.1 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.4.0 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.3.8 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.3.7 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.3.6 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.3.5 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.3.4 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.3.3 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.3.2 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.3.1 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.3.0 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.2.0 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.1.3 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.1.2 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.1.1 ios_tests/lib/ios/specs/common/patch.rb
appium_lib-9.1.0 ios_tests/lib/ios/specs/common/patch.rb