| /test/uiautomator/integration-tests/testapp/src/androidTest/java/androidx/test/uiautomator/testapp/ |
| D | BySelectorTest.java | 46 assertTrue(mDevice.hasObject(By.copy(base).text("Text View 1"))); in testCopy() 47 assertTrue(mDevice.hasObject(By.copy(base).text("Item1"))); in testCopy() 48 assertTrue(mDevice.hasObject(By.copy(base).text("Item3"))); in testCopy() 51 assertFalse(mDevice.hasObject(By.copy(base).text("Accessible button"))); in testCopy() 59 assertTrue(mDevice.hasObject(By.res(TEST_APP, "clazz").clazz("android.widget.Button"))); in testClazz() 60 assertFalse(mDevice.hasObject(By.res(TEST_APP, "clazz").clazz("android.widget.TextView"))); in testClazz() 64 assertTrue(mDevice.hasObject(By.res(TEST_APP, "clazz").clazz(".Button"))); in testClazz() 65 assertFalse(mDevice.hasObject(By.res(TEST_APP, "clazz").clazz(".TextView"))); in testClazz() 68 assertTrue(mDevice.hasObject(By.res(TEST_APP, "clazz").clazz("android.widget", "Button"))); in testClazz() 70 mDevice.hasObject(By.res(TEST_APP, "clazz").clazz("android.widget", "TextView"))); in testClazz() [all …]
|
| D | UiDeviceTest.java | 73 assertTrue(mDevice.hasObject(By.text("Accessible button"))); in testHasObject() 74 assertFalse(mDevice.hasObject(By.text("non-existent text"))); in testHasObject() 85 List<UiObject2> results = mDevice.findObjects(By.pkg(TEST_APP).clazz(TextView.class)); in testFindObjects() 102 assertEquals(0, mDevice.findObjects(By.text("non-existent text")).size()); in testFindObjects() 109 UiObject2 button = mDevice.findObject(By.res(TEST_APP, "new_window_button")); in testPerformActionAndWait() 112 assertTrue(mDevice.performActionAndWait(() -> mDevice.click(buttonCenter.x, buttonCenter.y), in testPerformActionAndWait() 120 mDevice.setCompressedLayoutHeirarchy(true); // NOTYPO in testSetCompressedLayoutHeirarchy() 121 assertNull(mDevice.findObject(By.res(TEST_APP, "nested_elements"))); in testSetCompressedLayoutHeirarchy() 123 mDevice.setCompressedLayoutHeirarchy(false); // NOTYPO in testSetCompressedLayoutHeirarchy() 124 assertNotNull(mDevice.findObject(By.res(TEST_APP, "nested_elements"))); in testSetCompressedLayoutHeirarchy() [all …]
|
| D | UiSelectorTest.java | 37 assertTrue(mDevice.findObject(new UiSelector().text("Sample text")).exists()); in testText() 38 assertFalse(mDevice.findObject(new UiSelector().text("Not text")).exists()); in testText() 47 assertTrue(mDevice.findObject(new UiSelector().textMatches(".*text.*")).exists()); in testTextMatches() 48 assertFalse(mDevice.findObject(new UiSelector().textMatches(".*nottext.*")).exists()); in testTextMatches() 58 assertTrue(mDevice.findObject(new UiSelector().textStartsWith("Text")).exists()); in testTextStartsWith() 59 assertFalse(mDevice.findObject(new UiSelector().textStartsWith("NotText")).exists()); in testTextStartsWith() 69 assertTrue(mDevice.findObject(new UiSelector().textContains("text")).exists()); in testTextContains() 70 assertFalse(mDevice.findObject(new UiSelector().textContains("not-text")).exists()); in testTextContains() 81 mDevice.findObject(new UiSelector().className("android.widget.Button")).exists()); in testClassName_withString() 83 mDevice.findObject(new UiSelector().className("android.widget.Switch")).exists()); in testClassName_withString() [all …]
|
| D | UiObjectTest.java | 47 assertTrue(message, mDevice.wait(d -> { in awaitTrue() 60 UiObject treeN2 = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id/tree_N2")); in testGetChild() 61 UiObject treeN3 = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id/tree_N3")); in testGetChild() 72 UiObject treeN4 = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id/tree_N4")); in testGetFromParent() 84 UiObject treeN2 = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id/tree_N2")); in testGetChildCount() 85 UiObject treeN3 = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id/tree_N3")); in testGetChildCount() 95 UiObject noNode = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id/no_node")); in testGetChildCount_throwsUiObjectNotFoundException() 105 UiObject dragButton = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id" in testDragTo_destObjAndSteps() 107 UiObject dragDestination = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id" in testDragTo_destObjAndSteps() 110 UiObject expectedDragDest = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id" in testDragTo_destObjAndSteps() [all …]
|
| D | UntilTest.java | 48 UiObject2 button = mDevice.findObject(By.res(TEST_APP, "gone_button")); in testGone() 52 assertTrue(mDevice.wait(Until.gone(target), TIMEOUT_MS)); in testGone() 59 UiObject2 button = mDevice.findObject(By.res(TEST_APP, "find_button")); in testHasObject() 63 assertTrue(mDevice.wait(Until.hasObject(target), TIMEOUT_MS)); in testHasObject() 70 UiObject2 button = mDevice.findObject(By.res(TEST_APP, "find_button")); in testFindObject() 74 assertNotNull(mDevice.wait(Until.findObject(target), TIMEOUT_MS)); in testFindObject() 81 UiObject2 button = mDevice.findObject(By.res(TEST_APP, "find_button")); in testFindObjects() 85 assertNotNull(mDevice.wait(Until.findObjects(target), TIMEOUT_MS)); in testFindObjects() 92 UiObject2 button = mDevice.findObject(By.res(TEST_APP, "checked_button")); in testChecked() 93 UiObject2 target = mDevice.findObject(By.res(TEST_APP, "checked_target")); in testChecked() [all …]
|
| D | MultiDisplayTest.java | 64 assertEquals(2, mDevice.findObjects(By.res(TEST_APP, "button")).size()); in testMultiDisplay_selector() 67 assertFalse(mDevice.hasObject( in testMultiDisplay_selector() 70 mDevice.hasObject(By.res(TEST_APP, "focusable_text_view").displayId( in testMultiDisplay_selector() 75 mDevice.hasObject( in testMultiDisplay_selector() 77 assertTrue(mDevice.hasObject( in testMultiDisplay_selector() 86 UiObject2 button = mDevice.findObject( in testMultiDisplay_click() 102 mDevice.findObjects( in testMultiDisplay_treeRelationship() 110 mDevice.findObject(By.hasAncestor(validAncestorSelector).displayId( in testMultiDisplay_treeRelationship() 122 mDevice.executeShellCommand( in testMultiDisplay_displayMetrics() 125 assertEquals(width, mDevice.getDisplayWidth(secondaryDisplayId)); in testMultiDisplay_displayMetrics() [all …]
|
| D | UiObject2Test.java | 66 UiObject2 object = mDevice.findObject(By.res(TEST_APP, "edit_text")); in testClear() 72 assertTrue(mDevice.wait(Until.hasObject(emptyText), TIMEOUT_MS)); in testClear() 80 UiObject2 button1 = mDevice.findObject(By.res(TEST_APP, "button1")); in testClick() 94 UiObject2 button2 = mDevice.findObject(By.res(TEST_APP, "button2")); in testClick_point() 101 UiObject2 button3 = mDevice.findObject(By.res(TEST_APP, "button3")); in testClick_point() 113 UiObject2 button4 = mDevice.findObject(By.res(TEST_APP, "button4")); in testClick_duration() 120 UiObject2 button5 = mDevice.findObject(By.res(TEST_APP, "button5")); in testClick_duration() 132 UiObject2 button6 = mDevice.findObject(By.res(TEST_APP, "button6")); in testClick_pointAndDuration() 139 UiObject2 button7 = mDevice.findObject(By.res(TEST_APP, "button7")); in testClick_pointAndDuration() 152 UiObject2 button = mDevice.findObject(By.res(TEST_APP, "new_window_button")); in testClickAndWait_conditionAndTimeout() [all …]
|
| D | MultiWindowTest.java | 40 assertTrue(mDevice.hasObject(STATUS_BAR)); in testMultiWindow_statusBar() 51 assertTrue(mDevice.wait(Until.hasObject(firstWindowSelector), TIMEOUT_MS)); in testMultiWindow_splitScreen() 52 UiObject2 firstWindow = mDevice.findObject(firstWindowSelector); in testMultiWindow_splitScreen() 56 assertTrue(mDevice.wait(Until.hasObject(secondWindowSelector), TIMEOUT_MS)); in testMultiWindow_splitScreen() 57 UiObject2 secondWindow = mDevice.findObject(secondWindowSelector); in testMultiWindow_splitScreen() 60 int width = mDevice.getDisplayWidth(); in testMultiWindow_splitScreen() 61 int height = mDevice.getDisplayHeight(); in testMultiWindow_splitScreen() 62 mDevice.click(width / 2, height / 4); in testMultiWindow_splitScreen() 63 mDevice.click(width / 2, 3 * height / 4); in testMultiWindow_splitScreen()
|
| D | BaseTest.java | 60 mDevice.dumpWindowHierarchy(System.err); 67 protected UiDevice mDevice; field in BaseTest 71 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp() 72 mDevice.wakeUp(); in setUp() 73 mDevice.pressMenu(); // Try to dismiss the lock screen if necessary. in setUp() 74 mDevice.pressHome(); in setUp() 75 mDevice.setOrientationNatural(); in setUp() 87 mDevice.wait(Until.hasObject(By.pkg(TEST_APP)), TIMEOUT_MS)); in launchTestActivity()
|
| D | UiScrollableTest.java | 143 UiObject target = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id" in testScrollDescriptionIntoView() 158 UiObject target = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id" in testScrollIntoView_withUiObject() 160 UiObject nonExistentTarget = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id" in testScrollIntoView_withUiObject() 178 assertFalse(mDevice.findObject(target).exists()); in testScrollIntoView_withUiSelector() 180 assertTrue(mDevice.findObject(target).exists()); in testScrollIntoView_withUiSelector() 190 UiObject target = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id" in testScrollTextIntoView() 285 UiObject topText = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id" in testScrollToBeginning_withSteps() 300 UiObject topText = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id" in testScrollToBeginning_notEnoughSwipes_failed() 315 UiObject topText = mDevice.findObject(new UiSelector().resourceId(TEST_APP + ":id" in testScrollToBeginning() 341 UiObject bottomText = mDevice.findObject( in testScrollToEnd_withSteps() [all …]
|
| D | ComposeTest.java | 41 UiObject2 top = mDevice.findObject(By.res("top-text")); in testEndToEnd() 45 UiObject2 column = mDevice.findObject(By.scrollable(true)); in testEndToEnd() 52 UiObject2 text = mDevice.wait(Until.findObject(By.text("Initial")), TIMEOUT_MS); in testEndToEnd()
|
| /test/uiautomator/uiautomator/src/androidTest/java/androidx/test/uiautomator/ |
| D | UiDeviceTest.java | 68 private UiDevice mDevice; field in UiDeviceTest 78 mDevice = new UiDevice(mInstrumentation); in setUp() 80 mDevice = new UiDevice(InstrumentationRegistry.getInstrumentation()); in setUp() 92 String densityCmdOutput = mDevice.executeShellCommand("wm density"); in testGetDisplayMetrics() 103 mDevice.executeShellCommand(String.format("wm size %dx%d", width, height)); in testGetDisplayMetrics() 108 assertEquals(width, mDevice.getDisplayWidth()); in testGetDisplayMetrics() 109 assertEquals(height, mDevice.getDisplayHeight()); in testGetDisplayMetrics() 110 assertEquals(expectedSizeDp, mDevice.getDisplaySizeDp()); in testGetDisplayMetrics() 112 mDevice.executeShellCommand("wm size reset"); in testGetDisplayMetrics() 118 assertEquals(Build.PRODUCT, mDevice.getProductName()); in testGetProductName() [all …]
|
| /test/uiautomator/uiautomator/src/main/java/androidx/test/uiautomator/ |
| D | UiAutomatorTestCase.java | 35 private UiDevice mDevice; field in UiAutomatorTestCase 44 return mDevice; in getUiDevice() 82 mDevice = UiDevice.getInstance(getInstrumentation()); in initialize()
|
| D | QueryController.java | 45 private final UiDevice mDevice; field in QueryController 94 mDevice = device; in QueryController() 95 mDevice.getUiAutomation().setOnAccessibilityEventListener(mEventListener); in QueryController() 182 rootNode = mDevice.getUiAutomation().getRootInActiveWindow(); in getRootNode() 531 if (mDevice.isInWatcherContext()) { in waitForIdle() 535 mDevice.getUiAutomation().waitForIdle(QUIET_TIME_TO_BE_CONSIDERED_IDLE_STATE, timeout); in waitForIdle()
|
| D | GestureController.java | 70 private final UiDevice mDevice; field in GestureController 83 mDevice = device; in GestureController() 173 Display display = mDevice.getDisplayById(displayId); in performGesture() 349 return mDevice; in getDevice()
|
| D | InteractionController.java | 57 private final UiDevice mDevice; field in InteractionController 91 mDevice = device; in InteractionController() 491 PowerManager pm = (PowerManager) mDevice.getInstrumentation().getContext().getSystemService( in isScreenOn() 623 return mDevice.getUiAutomation(); in getUiAutomation()
|
| D | ByMatcher.java | 46 private final UiDevice mDevice; field in ByMatcher 60 mDevice = device; in ByMatcher() 121 mDevice.runWatchers(); in findMatches()
|
| D | UiObject.java | 53 private final UiDevice mDevice; field in UiObject 68 mDevice = UiDevice.getInstance(); in UiObject() 76 mDevice = device; in UiObject() 94 return mDevice; in getDevice()
|
| D | UiObject2.java | 84 private final UiDevice mDevice; field in UiObject2 98 mDevice = device; in UiObject2() 1056 return mDevice; in getDevice()
|