Module: Appium::Flutter::Finder
- Defined in:
- lib/appium_flutter_finder.rb,
lib/appium_flutter_finder/version.rb
Overview
Get find element context for flutter driver
Constant Summary collapse
- VERSION =
'0.7.1'.freeze
Instance Method Summary collapse
- #by_ancestor(serialized_finder:, matching:, match_root: false, first_match_only: false) ⇒ Object
- #by_descendant(serialized_finder:, matching:, match_root: false, first_match_only: false) ⇒ Object
- #by_semantics_label(label) ⇒ Object
- #by_text(text) ⇒ Object
- #by_tooltip(text) ⇒ Object
- #by_type(type) ⇒ Object
- #by_value_key(key) ⇒ Object
- #page_back ⇒ Object
Instance Method Details
#by_ancestor(serialized_finder:, matching:, match_root: false, first_match_only: false) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/appium_flutter_finder.rb', line 22 def by_ancestor(serialized_finder:, matching:, match_root: false, first_match_only: false) by_ancestor_or_descendant( type: 'Ancestor', serialized_finder: serialized_finder, matching: matching, match_root: match_root, first_match_only: first_match_only ) end |
#by_descendant(serialized_finder:, matching:, match_root: false, first_match_only: false) ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/appium_flutter_finder.rb', line 32 def by_descendant(serialized_finder:, matching:, match_root: false, first_match_only: false) by_ancestor_or_descendant( type: 'Descendant', serialized_finder: serialized_finder, matching: matching, match_root: match_root, first_match_only: first_match_only ) end |
#by_semantics_label(label) ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'lib/appium_flutter_finder.rb', line 42 def by_semantics_label(label) serialize( finderType: 'BySemanticsLabel', isRegExp: label.is_a?(Regexp), # Should be '/a/' as String in regex case label: label.is_a?(Regexp) ? label.source : label ) end |
#by_text(text) ⇒ Object
79 80 81 82 83 84 |
# File 'lib/appium_flutter_finder.rb', line 79 def by_text(text) serialize( finderType: 'ByText', text: text ) end |
#by_tooltip(text) ⇒ Object
51 52 53 54 55 56 |
# File 'lib/appium_flutter_finder.rb', line 51 def by_tooltip(text) serialize( finderType: 'ByTooltipMessage', text: text ) end |
#by_type(type) ⇒ Object
58 59 60 61 62 63 |
# File 'lib/appium_flutter_finder.rb', line 58 def by_type(type) serialize( finderType: 'ByType', type: type ) end |
#by_value_key(key) ⇒ Object
65 66 67 68 69 70 71 |
# File 'lib/appium_flutter_finder.rb', line 65 def by_value_key(key) serialize( finderType: 'ByValueKey', keyValueString: key, keyValueType: key.is_a?(String) ? 'String' : 'int' ) end |
#page_back ⇒ Object
73 74 75 76 77 |
# File 'lib/appium_flutter_finder.rb', line 73 def page_back serialize( finderType: 'PageBack' ) end |