@@ -44,6 +44,7 @@ def __init__(self, command_executor='http://127.0.0.1:4444/wd/hub',
44
44
# add new method to the `find_by_*` pantheon
45
45
By .IOS_UIAUTOMATION = MobileBy .IOS_UIAUTOMATION
46
46
By .IOS_PREDICATE = MobileBy .IOS_PREDICATE
47
+ By .IOS_CLASS_CHAIN = MobileBy .IOS_CLASS_CHAIN
47
48
By .ANDROID_UIAUTOMATOR = MobileBy .ANDROID_UIAUTOMATOR
48
49
By .ACCESSIBILITY_ID = MobileBy .ACCESSIBILITY_ID
49
50
@@ -121,6 +122,28 @@ def find_elements_by_ios_predicate(self, predicate_string):
121
122
"""
122
123
return self .find_elements (by = By .IOS_PREDICATE , value = predicate_string )
123
124
125
+ def find_element_by_ios_class_chain (self , class_chain_string ):
126
+ """Find an element by ios class chain string.
127
+
128
+ :Args:
129
+ - class_chain_string - The class chain string
130
+
131
+ :Usage:
132
+ driver.find_element_by_class_chain('XCUIElementTypeWindow/XCUIElementTypeButton[3]')
133
+ """
134
+ return self .find_element (by = By .IOS_CLASS_CHAIN , value = class_chain_string )
135
+
136
+ def find_elements_by_class_chain (self , class_chain_string ):
137
+ """Finds elements by ios class chain string.
138
+
139
+ :Args:
140
+ - class_chain_string - The class chain string
141
+
142
+ :Usage:
143
+ driver.find_elements_by_class_chain('XCUIElementTypeWindow[2]/XCUIElementTypeAny[-2]')
144
+ """
145
+ return self .find_elements (by = By .IOS_CLASS_CHAIN , value = class_chain_string )
146
+
124
147
def find_element_by_android_uiautomator (self , uia_string ):
125
148
"""Finds element by uiautomator in Android.
126
149
0 commit comments