Sha256: 34410ac7aeba1c9193893fbd9b6644a7cf19fed1995eb4c69930b8396f230a29
Contents?: true
Size: 1.68 KB
Versions: 2
Compression:
Stored size: 1.68 KB
Contents
# rake android[android/helper] describe 'android/helper' do t 'tags' do wait { tags('android.widget.TextView').length.must_equal 12 } end def page_class_data (<<-TXT).strip 14x android.widget.TextView 1x android.view.View 1x android.widget.ListView 1x android.widget.FrameLayout 1x hierarchy TXT end # t 'get_selendroid_inspect' # only works on selendroid t 'get_page_class' do # digit values change based on screen size # larger screens have more elements wait do exp = page_class_data.gsub(/\d+/, '') act = get_page_class.gsub(/\d+/, '') act.must_equal exp end end # t 'page_class' do # tested by get_page_class t 'get_android_inspect' do # line count changes based on screen size wait { get_android_inspect.split("\n").length.must_be :>=, 40 } end # t 'get_inspect' do # tested by get_android_inspect # t 'page' do # tested by get_android_inspect def id_key 'animation_2_instructions' end def id_value 'Select an animation:' end t 'xml_keys' do wait do id_pair = xml_keys id_key id_pair = id_pair.to_a[0] id_pair.length.must_equal 2 id_pair.first.must_equal id_key id_pair.last.must_equal id_value end end t 'resolve_id' do wait do str = resolve_id id_key str.must_equal id_value end end t 'xml_values' do wait do value = xml_values(id_value).first.last value.must_equal id_value end end t 'find by id' do wait do find('accessibility').click find('accessibility node provider').click id 'accessibility_node_provider' # Accessibility/Accessibility Node Provider 2.times { back } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
appium_lib-2.1.0 | android_tests/lib/android/specs/android/helper.rb |
appium_lib-2.0.0 | android_tests/lib/android/specs/android/helper.rb |