lib/appium_lib/ios/element/text.rb in appium_lib-9.15.1 vs lib/appium_lib/ios/element/text.rb in appium_lib-9.15.2

- old
+ new

@@ -13,18 +13,20 @@ # @param value [String, Integer] the value to find. # If int then the UIAStaticText|XCUIElementTypeStaticText at that index is returned. # @return [UIAStaticText|XCUIElementTypeStaticText] def text(value) return ele_index static_text_class, value if value.is_a? Numeric + ele_by_json_visible_contains static_text_class, value end # Find all UIAStaticTexts|XCUIElementTypeStaticTexts containing value. # If value is omitted, all UIAStaticTexts|XCUIElementTypeStaticTexts are returned # @param value [String] the value to search for # @return [Array<UIAStaticText|XCUIElementTypeStaticText>] def texts(value = false) return tags static_text_class unless value + eles_by_json_visible_contains static_text_class, value end # Find the first UIAStaticText|XCUIElementTypeStaticText. # @return [UIAStaticText|XCUIElementTypeStaticText]