1 2 3 4 | find_element :accessibility_id, 'Animation' find_elements :accessibility_id, 'Animation' find_element :uiautomator, 'new UiSelector().clickable(true)' find_elements :uiautomator, 'new UiSelector().clickable(true)' |
1 | find_element id: 'resource_id' |
1 2 | text(value_or_index) :Find the first TextView that contains value or by index. If int then the TextView at that index is returned. button(value_or_index):Find the first button that contains value or by index. If int then the button at that index is returned |
1 2 3 4 5 6 7 8 9 | el = self.driver.find_element_by_android_uiautomator('new UiSelector().description("Animation")') self.assertIsNotNone(el) els = self.driver.find_elements_by_android_uiautomator('new UiSelector().clickable(true)') self.assertIsInstance(els, list) el = self.driver.find_element_by_accessibility_id('Animation') self.assertIsNotNone(el) els = self.driver.find_elements_by_accessibility_id('Animation') self.assertIsInstance(els, list) |
1 2 3 4 | find_element_by_accessibility_id find_elements_by_accessibility_id find_element_by_android_uiautomator find_element_by_android_uiautomator |
1 2 3 4 5 6 | findElementByAccessibilityId() findElementsByAccessibilityId() findElementByIosUIAutomation() findElementsByIosUIAutomation() findElementByAndroidUIAutomator() findElementsByAndroidUIAutomator() |
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) | Powered by Discuz! X3.2 |