lib/appium_lib/ios/element/text.rb in appium_lib-9.2.0 vs lib/appium_lib/ios/element/text.rb in appium_lib-9.3.0
- old
+ new
@@ -1,25 +1,25 @@
# UIAStaticText|XCUIElementTypeStaticText methods
module Appium
module Ios
- IAStaticText = 'UIAStaticText'.freeze
+ UIAStaticText = 'UIAStaticText'.freeze
XCUIElementTypeStaticText = 'XCUIElementTypeStaticText'.freeze
# @return [String] Class name for text
def static_text_class
- automation_name_is_xcuitest? ? XCUIElementTypeStaticText : IAStaticText
+ automation_name_is_xcuitest? ? XCUIElementTypeStaticText : UIAStaticText
end
# Find the first UIAStaticText|XCUIElementTypeStaticText that contains value or by index.
# @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
if automation_name_is_xcuitest?
- _raise_error_if_no_element texts(value).first
+ raise_error_if_no_element texts(value).first
else
ele_by_json_visible_contains static_text_class, value
end
end
@@ -29,12 +29,12 @@
# @return [Array<UIAStaticText|XCUIElementTypeStaticText>]
def texts(value = false)
return tags static_text_class unless value
if automation_name_is_xcuitest?
- elements = tags static_text_class
- _elements_include elements, value
+ visible_elements = tags static_text_class
+ elements_include visible_elements, value
else
eles_by_json_visible_contains static_text_class, value
end
end
@@ -53,22 +53,22 @@
# Find the first UIAStaticText|XCUIElementTypeStaticText that exactly matches value.
# @param value [String] the value to match exactly
# @return [UIAStaticText|XCUIElementTypeStaticText]
def text_exact(value)
if automation_name_is_xcuitest?
- _raise_error_if_no_element texts_exact(value).first
+ raise_error_if_no_element texts_exact(value).first
else
ele_by_json_visible_exact static_text_class, value
end
end
# 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?
- elements = tags static_text_class
- _elements_exact elements, value
+ visible_elements = tags static_text_class
+ elements_exact visible_elements, value
else
eles_by_json_visible_exact static_text_class, value
end
end
end # module Ios