Sha256: 29d32d93ba24d24b855c235d8c59bc352ad3970a4fb4de93391a7b36f5ff58c1
Contents?: true
Size: 1018 Bytes
Versions: 12
Compression:
Stored size: 1018 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 + "'" line2 = ' ' * (indent + 2) + "prefix '" + klass + "'" # button must translate to both button and image button # for ruby_lib to find all buttons line2 += ", 'ImageButton'" if klass == 'Button' puts line2 end =begin # for Pry class Object def must_equal b raise 'not equal' unless self == b end end =end
Version data entries
12 entries across 12 versions & 1 rubygems