lib/appium_lib/ios/element/text.rb in appium_lib-9.3.3 vs lib/appium_lib/ios/element/text.rb in appium_lib-9.3.4
- old
+ new
@@ -29,12 +29,12 @@
# @return [Array<UIAStaticText|XCUIElementTypeStaticText>]
def texts(value = false)
return tags static_text_class unless value
if automation_name_is_xcuitest?
- visible_elements = tags static_text_class
- elements_include visible_elements, value
+ elements = find_eles_by_predicate_include(class_name: static_text_class, value: value)
+ select_visible_elements elements
else
eles_by_json_visible_contains static_text_class, value
end
end
@@ -64,11 +64,11 @@
# Find all UIAStaticTexts|XCUIElementTypeStaticTexts that exactly match value.
# @param value [String] the value to match exactly
# @return [Array<UIAStaticText|XCUIElementTypeStaticText>]
def texts_exact(value)
if automation_name_is_xcuitest?
- visible_elements = tags static_text_class
- elements_exact visible_elements, value
+ elements = find_eles_by_predicate(class_name: static_text_class, value: value)
+ select_visible_elements elements
else
eles_by_json_visible_exact static_text_class, value
end
end
end # module Ios