新手学appium-python-client+appium api 3-webelement
1 def find_element_by_ios_uiautomation(self, uia_string): 2 """Finds an element by uiautomation in iOS. 3 4 :Args: 5 - uia_string - The element name in the iOS UIAutomation library 6 7 :Usage: 8 driver.find_element_by_ios_uiautomation('.elements()[1].cells()[2]') 9 """ 10 return self.find_element(by=By.IOS_UIAUTOMATION, value=uia_string) 11 12 def find_elements_by_ios_uiautomation(self, uia_string): 13 """Finds elements by uiautomation in iOS. 14 15 :Args: 16 - uia_string - The element name in the iOS UIAutomation library 17 18 :Usage: 19 driver.find_elements_by_ios_uiautomation('.elements()[1].cells()[2]') 20 """ 21 return self.find_elements(by=By.IOS_UIAUTOMATION, value=uia_string) 22 23 def find_element_by_android_uiautomator(self, uia_string): 24 """Finds element by uiautomator in Android. 25 26 :Args: 27 - uia_string - The element name in the Android UIAutomator library 28 29 :Usage: 30 driver.find_element_by_android_uiautomator('.elements()[1].cells()[2]') 31 """ 32 return self.find_element(by=By.ANDROID_UIAUTOMATOR, value=uia_string) 33 34 def find_elements_by_android_uiautomator(self, uia_string): 35 """Finds elements by uiautomator in Android. 36 37 :Args: 38 - uia_string - The element name in the Android UIAutomator library 39 40 :Usage: 41 driver.find_elements_by_android_uiautomator('.elements()[1].cells()[2]') 42 """ 43 return self.find_elements(by=By.ANDROID_UIAUTOMATOR, value=uia_string) 44 45 def find_element_by_accessibility_id(self, id): 46 """Finds an element by accessibility id. 47 48 :Args: 49 - id - a string corresponding to a recursive element search using the 50 Id/Name that the native Accessibility options utilize 51 52 :Usage: 53 driver.find_element_by_accessibility_id() 54 """ 55 return self.find_element(by=By.ACCESSIBILITY_ID, value=id) 56 57 def find_elements_by_accessibility_id(self, id): 58 """Finds elements by accessibility id. 59 60 :Args: 61 - id - a string corresponding to a recursive element search using the 62 Id/Name that the native Accessibility options utilize 63 64 :Usage: 65 driver.find_elements_by_accessibility_id() 66 """ 67 return self.find_elements(by=By.ACCESSIBILITY_ID, value=id)