Module: TestaAppiumDriver::TypeSelectors
- Included in:
- Appium::Core::Element, Driver, Locator
- Defined in:
- lib/testa_appium_driver/ios/type_selectors.rb
Overview
noinspection ALL
Instance Method Summary collapse
- #add_selector(*args, &block) ⇒ TestaAppiumDriver::Locator
- #button(params = {}) ⇒ TestaAppiumDriver::Locator
- #buttons(params = {}) ⇒ TestaAppiumDriver::Locator
- #cell(params = {}) ⇒ TestaAppiumDriver::Locator
- #cells(params = {}) ⇒ TestaAppiumDriver::Locator
- #collection_view(params = {}) ⇒ TestaAppiumDriver::Locator
- #collection_views(params = {}) ⇒ TestaAppiumDriver::Locator
-
#element(selectors = {}) ⇒ TestaAppiumDriver::Locator
First element.
-
#elements(params = {}) ⇒ TestaAppiumDriver::Locator
All elements that match given selectors.
- #image(params = {}) ⇒ TestaAppiumDriver::Locator
- #images(params = {}) ⇒ TestaAppiumDriver::Locator
- #navigation_bar(params = {}) ⇒ TestaAppiumDriver::Locator
- #navigation_bars(params = {}) ⇒ TestaAppiumDriver::Locator
- #other(params = {}) ⇒ TestaAppiumDriver::Locator
- #others(params = {}) ⇒ TestaAppiumDriver::Locator
- #scroll_view(params = {}) ⇒ TestaAppiumDriver::Locator
- #scroll_views(params = {}) ⇒ TestaAppiumDriver::Locator
- #secure_text_field(params = {}) ⇒ TestaAppiumDriver::Locator
- #secure_text_fields(params = {}) ⇒ TestaAppiumDriver::Locator
- #static_text(params = {}) ⇒ TestaAppiumDriver::Locator
- #static_texts(params = {}) ⇒ TestaAppiumDriver::Locator
- #table(params = {}) ⇒ TestaAppiumDriver::Locator
- #tables(params = {}) ⇒ TestaAppiumDriver::Locator
- #text_field(params = {}) ⇒ TestaAppiumDriver::Locator
- #text_fields(params = {}) ⇒ TestaAppiumDriver::Locator
- #window(params = {}) ⇒ TestaAppiumDriver::Locator
- #windows(params = {}) ⇒ TestaAppiumDriver::Locator
Instance Method Details
#add_selector(*args, &block) ⇒ TestaAppiumDriver::Locator
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 6 def add_selector(*args, &block) # if class selector is executed from driver, create new locator instance if self.kind_of?(TestaAppiumDriver::Driver) || self.instance_of?(::Selenium::WebDriver::Element) || self.instance_of?(::Appium::Core::Element) args.last[:default_find_strategy] = @default_find_strategy args.last[:default_scroll_strategy] = @default_scroll_strategy if self.instance_of?(::Selenium::WebDriver::Element) || self.instance_of?(::Appium::Core::Element) driver = self.get_driver else driver = self end Locator.new(driver, self, *args) else # class selector is executed from locator, just add child selector criteria self.add_child_selector(*args) end end |
#button(params = {}) ⇒ TestaAppiumDriver::Locator
79 80 81 82 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 79 def (params = {}) params[:type] = "XCUIElementTypeButton" add_selector(params) end |
#buttons(params = {}) ⇒ TestaAppiumDriver::Locator
85 86 87 88 89 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 85 def (params = {}) params[:type] = "XCUIElementTypeButton" params[:single] = false add_selector(params) end |
#cell(params = {}) ⇒ TestaAppiumDriver::Locator
160 161 162 163 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 160 def cell(params = {}) params[:type] = "XCUIElementTypeCell" add_selector(params) end |
#cells(params = {}) ⇒ TestaAppiumDriver::Locator
166 167 168 169 170 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 166 def cells(params = {}) params[:type] = "XCUIElementTypeCell" params[:single] = false add_selector(params) end |
#collection_view(params = {}) ⇒ TestaAppiumDriver::Locator
92 93 94 95 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 92 def collection_view(params = {}) params[:type] = "XCUIElementTypeCollectionView" add_selector(params) end |
#collection_views(params = {}) ⇒ TestaAppiumDriver::Locator
98 99 100 101 102 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 98 def collection_views(params = {}) params[:type] = "XCUIElementTypeCollectionView" params[:single] = false add_selector(params) end |
#element(selectors = {}) ⇒ TestaAppiumDriver::Locator
Returns first element.
25 26 27 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 25 def element(selectors = {}) add_selector(selectors) end |
#elements(params = {}) ⇒ TestaAppiumDriver::Locator
Returns all elements that match given selectors.
31 32 33 34 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 31 def elements(params = {}) params[:single] = false add_selector(params) end |
#image(params = {}) ⇒ TestaAppiumDriver::Locator
106 107 108 109 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 106 def image(params = {}) params[:type] = "XCUIElementTypeImage" add_selector(params) end |
#images(params = {}) ⇒ TestaAppiumDriver::Locator
112 113 114 115 116 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 112 def images(params = {}) params[:type] = "XCUIElementTypeImage" params[:single] = false add_selector(params) end |
#navigation_bar(params = {}) ⇒ TestaAppiumDriver::Locator
65 66 67 68 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 65 def (params = {}) params[:type] = "XCUIElementTypeNavigationBar" add_selector(params) end |
#navigation_bars(params = {}) ⇒ TestaAppiumDriver::Locator
71 72 73 74 75 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 71 def (params = {}) params[:type] = "XCUIElementTypeNavigationBar" params[:single] = false add_selector(params) end |
#other(params = {}) ⇒ TestaAppiumDriver::Locator
51 52 53 54 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 51 def other(params = {}) params[:type] = "XCUIElementTypeOther" add_selector(params) end |
#others(params = {}) ⇒ TestaAppiumDriver::Locator
57 58 59 60 61 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 57 def others(params = {}) params[:type] = "XCUIElementTypeOther" params[:single] = false add_selector(params) end |
#scroll_view(params = {}) ⇒ TestaAppiumDriver::Locator
133 134 135 136 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 133 def scroll_view(params = {}) params[:type] = "XCUIElementTypeScrollView" add_selector(params) end |
#scroll_views(params = {}) ⇒ TestaAppiumDriver::Locator
139 140 141 142 143 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 139 def scroll_views(params = {}) params[:type] = "XCUIElementTypeScrollView" params[:single] = false add_selector(params) end |
#secure_text_field(params = {}) ⇒ TestaAppiumDriver::Locator
189 190 191 192 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 189 def secure_text_field(params = {}) params[:type] = "XCUIElementTypeSecureTextField" add_selector(params) end |
#secure_text_fields(params = {}) ⇒ TestaAppiumDriver::Locator
195 196 197 198 199 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 195 def secure_text_fields(params = {}) params[:type] = "XCUIElementTypeSecureTextField" params[:single] = false add_selector(params) end |
#static_text(params = {}) ⇒ TestaAppiumDriver::Locator
119 120 121 122 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 119 def static_text(params = {}) params[:type] = "XCUIElementTypeStaticText" add_selector(params) end |
#static_texts(params = {}) ⇒ TestaAppiumDriver::Locator
125 126 127 128 129 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 125 def static_texts(params = {}) params[:type] = "XCUIElementTypeStaticText" params[:single] = false add_selector(params) end |
#table(params = {}) ⇒ TestaAppiumDriver::Locator
147 148 149 150 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 147 def table(params = {}) params[:type] = "XCUIElementTypeTable" add_selector(params) end |
#tables(params = {}) ⇒ TestaAppiumDriver::Locator
153 154 155 156 157 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 153 def tables(params = {}) params[:type] = "XCUIElementTypeTable" params[:single] = false add_selector(params) end |
#text_field(params = {}) ⇒ TestaAppiumDriver::Locator
175 176 177 178 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 175 def text_field(params = {}) params[:type] = "XCUIElementTypeTextField" add_selector(params) end |
#text_fields(params = {}) ⇒ TestaAppiumDriver::Locator
181 182 183 184 185 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 181 def text_fields(params = {}) params[:type] = "XCUIElementTypeTextField" params[:single] = false add_selector(params) end |
#window(params = {}) ⇒ TestaAppiumDriver::Locator
38 39 40 41 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 38 def window(params = {}) params[:type] = "XCUIElementTypeWindow" add_selector(params) end |
#windows(params = {}) ⇒ TestaAppiumDriver::Locator
44 45 46 47 48 |
# File 'lib/testa_appium_driver/ios/type_selectors.rb', line 44 def windows(params = {}) params[:type] = "XCUIElementTypeWindow" params[:single] = false add_selector(params) end |