Skip to content

Commit 0f819c0

Browse files
committed
Add findChainedElementsTest.
1 parent 7530dee commit 0f819c0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/test/java/io/appium/java_client/AndroidUIAutomatorTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,15 @@ public void findElementsByTest() {
8484
assertTrue(elements.size() > 11);
8585
}
8686

87+
@Test
88+
public void findChainedElementsTest() {
89+
MobileElement el1 = (MobileElement) driver.findElementByAndroidUIAutomator("resourceId(\"android:id/content\")");
90+
MobileElement el2 = (MobileElement) el1.findElementByAndroidUIAutomator("text(\"Accessibility\")");
91+
el2.click();
92+
MobileElement el3 = (MobileElement) driver.findElementByAndroidUIAutomator("text(\"Custom View\")");
93+
assertTrue(el3.isDisplayed());
94+
}
95+
8796
@Test(expected = IllegalArgumentException.class)
8897
public void ErrorTest() {
8998
driver.findElementByAndroidUIAutomator(null);

0 commit comments

Comments
 (0)