Sha256: 647a89e4d484e75c52cab886576192d8590b950889d5ee24abc9dbe7679fc2d4

Contents?: true

Size: 1021 Bytes

Versions: 20

Compression:

Stored size: 1021 Bytes

Contents

# helper code useful for writing and verifying tests using Pry
list = <<TXT
find
text
texts
name
names
scroll_to
TXT

list.split("\n").each do |method|
  puts "t '#{method}' do"
  puts
  puts 'end'
  puts
end

# --

# Format AndroidElementClassMap from
# https://github.com/appium/appium/blob/master/android/bootstrap/src/io/appium/android/bootstrap/AndroidElementClassMap.java
# for ruby_lib android/helper.rb tag_name_to_android
list = <<TXT
    map.put("abslist", "AbsListView");
    map.put("button", "Button");
TXT

list.split("\n").each do |method|
  pair  = method.match(/"([^"]+)"[^"]+"([^"]+)"/)
  tag   = pair[1]
  klass = pair[2]

  indent = 6
  puts ' ' * indent + "when '" + tag + "'"
  line_2 = ' ' * (indent + 2) + "prefix '" + klass + "'"
  # button must translate to both button and image button
  # for ruby_lib to find all buttons
  line_2 += ", 'ImageButton'" if klass == 'Button'
  puts line_2
end

# for Pry
# class Object
#   def must_equal b
#     raise 'not equal' unless self == b
#   end
# end

Version data entries

20 entries across 20 versions & 1 rubygems

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