Home
last modified time | relevance | path

Searched refs:selector (Results 1 – 25 of 67) sorted by relevance

123

/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-39707/src/android/security/cts/CVE_2021_39707/
DDeviceTest.java66 BySelector selector = By.text(textRestrictedUser); in testAppRestrictionsFragment() local
69 device.wait(Until.hasObject(selector), uiTimeoutMs)); in testAppRestrictionsFragment()
70 device.findObject(selector).click(); in testAppRestrictionsFragment()
74 selector = By.text(textAppContentAccess); in testAppRestrictionsFragment()
76 device.wait(Until.hasObject(selector), uiTimeoutMs)); in testAppRestrictionsFragment()
77 device.findObject(selector).click(); in testAppRestrictionsFragment()
87 selector = By.text(textTestApp); in testAppRestrictionsFragment()
89 device.wait(Until.hasObject(selector), uiTimeoutMs)); in testAppRestrictionsFragment()
90 UiObject2 parent = device.findObject(selector).getParent().getParent().getParent(); in testAppRestrictionsFragment()
91 selector = By.res(context.getString(R.string.resTestAppIcon, settingsPkgName)); in testAppRestrictionsFragment()
[all …]
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DUiAutomatorUtils2.java79 public static void waitUntilObjectGone(BySelector selector) { in waitUntilObjectGone() argument
80 waitUntilObjectGone(selector, 20_000); in waitUntilObjectGone()
83 public static void waitUntilObjectGone(BySelector selector, long timeoutMs) { in waitUntilObjectGone() argument
85 if (getUiDevice().wait(Until.gone(selector), timeoutMs)) { in waitUntilObjectGone()
94 throw new RuntimeException("view " + selector + " is still visible after " + timeoutMs in waitUntilObjectGone()
103 public static UiObject2 waitFindObject(BySelector selector) throws UiObjectNotFoundException { in waitFindObject() argument
104 return waitFindObject(selector, 20_000); in waitFindObject()
107 public static UiObject2 waitFindObject(BySelector selector, long timeoutMs) in waitFindObject() argument
109 final UiObject2 view = waitFindObjectOrNull(selector, timeoutMs); in waitFindObject()
111 assertNotNull("View not found after waiting for " + timeoutMs + "ms: " + selector, in waitFindObject()
[all …]
DUiAutomatorUtils.java74 public static UiObject2 waitFindObject(BySelector selector) throws UiObjectNotFoundException { in waitFindObject() argument
75 return waitFindObject(selector, 20_000); in waitFindObject()
78 public static UiObject2 waitFindObject(BySelector selector, long timeoutMs) in waitFindObject() argument
80 final UiObject2 view = waitFindObjectOrNull(selector, timeoutMs); in waitFindObject()
82 assertNotNull("View not found after waiting for " + timeoutMs + "ms: " + selector, in waitFindObject()
88 public static UiObject2 waitFindObjectOrNull(BySelector selector) in waitFindObjectOrNull() argument
90 return waitFindObjectOrNull(selector, 20_000); in waitFindObjectOrNull()
121 public static UiObject2 waitFindObjectOrNull(BySelector selector, long timeoutMs) in waitFindObjectOrNull() argument
134 view = getUiDevice().wait(Until.findObject(selector), 1000); in waitFindObjectOrNull()
/cts/tests/tests/security/src/android/security/cts/CVE_2023_20953/
DCVE_2023_20953.java71 BySelector selector = By.text("CVE-2023-20955"); in testCliboardIfUserSetupNotComplete() local
73 boolean uiFound = device.wait(Until.findObject(selector), timeoutMs) != null; in testCliboardIfUserSetupNotComplete()
74 assumeTrue(String.format(uiNotFoundMsg, selector), uiFound); in testCliboardIfUserSetupNotComplete()
75 UiObject2 object = device.findObject(selector); in testCliboardIfUserSetupNotComplete()
80 selector = By.desc(Pattern.compile(".*copy.*", Pattern.CASE_INSENSITIVE)); in testCliboardIfUserSetupNotComplete()
81 uiFound = device.wait(Until.findObject(selector), timeoutMs) != null; in testCliboardIfUserSetupNotComplete()
82 assumeTrue(String.format(uiNotFoundMsg, selector), uiFound); in testCliboardIfUserSetupNotComplete()
83 device.findObject(selector).click(); in testCliboardIfUserSetupNotComplete()
100 selector = By.res(String.format(shareBtnResName, systemUiPkgName)); in testCliboardIfUserSetupNotComplete()
102 device.wait(Until.hasObject(selector), timeoutMs)); in testCliboardIfUserSetupNotComplete()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2022-20223/src/android/security/cts/CVE_2022_20223/
DDeviceTest.java54 private boolean clickUiObject(BySelector selector) { in clickUiObject() argument
55 boolean objectFound = mDevice.wait(Until.hasObject(selector), TIMEOUT_MS); in clickUiObject()
57 mDevice.findObject(selector).click(); in clickUiObject()
80 BySelector selector = By.text(text); in testAppRestrictionsFragment() local
81 assumeTrue(mContext.getString(R.string.timedOutMsg, text), clickUiObject(selector)); in testAppRestrictionsFragment()
87 selector = By.text(text); in testAppRestrictionsFragment()
88 assumeTrue(mContext.getString(R.string.timedOutMsg, text), clickUiObject(selector)); in testAppRestrictionsFragment()
95 BySelector selector = By.text(mContext.getString(R.string.userName)); in testAppRestrictionsFragment() local
97 mContext.getString(R.string.userName)), clickUiObject(selector)); in testAppRestrictionsFragment()
106 selector = By.text(text); in testAppRestrictionsFragment()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/proxy/
DPacProxyTest.java206 ProxySelector selector = ProxySelector.getDefault(); in testDirect() local
207 List<Proxy> list = selector.select(uri); in testDirect()
222 ProxySelector selector = ProxySelector.getDefault(); in testLocalPlusDirect() local
223 List<Proxy> list = selector.select(uri); in testLocalPlusDirect()
241 ProxySelector selector = ProxySelector.getDefault(); in testHostPassthrough() local
242 List<Proxy> list = selector.select(uri); in testHostPassthrough()
261 ProxySelector selector = ProxySelector.getDefault(); in testUrlPassthrough() local
262 List<Proxy> list = selector.select(uri); in testUrlPassthrough()
268 list = selector.select(uri); in testUrlPassthrough()
284 ProxySelector selector = ProxySelector.getDefault(); in testStringCase() local
[all …]
DStaticProxyTest.java81 ProxySelector selector = ProxySelector.getDefault(); in testProxySelector() local
82 List<Proxy> list = selector.select(uri); in testProxySelector()
99 ProxySelector selector = ProxySelector.getDefault(); in testProxySelectorExclude() local
100 List<Proxy> list = selector.select(uri); in testProxySelectorExclude()
111 ProxySelector selector = ProxySelector.getDefault(); in testClearProxySelector() local
112 List<Proxy> list = selector.select(uri); in testClearProxySelector()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0602/src/android/security/cts/CVE_2021_0602/
DDeviceTest.java62 private boolean clickUiObject(BySelector selector) { in clickUiObject() argument
63 boolean objectFound = mDevice.wait(Until.hasObject(selector), WAIT_MS); in clickUiObject()
65 mDevice.findObject(selector).click(); in clickUiObject()
115 BySelector selector = By.text(workPattern); in testCVE_2021_0602() local
120 clickUiObject(selector)); in testCVE_2021_0602()
160 selector = By.text(text); in testCVE_2021_0602()
165 clickUiObject(selector)); in testCVE_2021_0602()
168 selector = By.text(context.getString(R.string.testNetworkSSID)); in testCVE_2021_0602()
173 clickUiObject(selector)); in testCVE_2021_0602()
179 selector = By.text(workPattern); in testCVE_2021_0602()
[all …]
/cts/tests/tests/media/common/src/android/media/cts/
DMediaProjectionActivity.java186 private static UiObject2 findUiObject(BySelector selector) { in findUiObject() argument
188 UiObject2 obj = waitForObject(selector); in findUiObject()
192 Log.w(TAG, "Couldn't find " + selector + ", now scrolling to it."); in findUiObject()
194 obj = waitForObject(selector); in findUiObject()
197 Log.w(TAG, "Still couldn't find " + selector + ", now scrolling screen height."); in findUiObject()
199 obj = UiAutomatorUtils.waitFindObjectOrNull(selector); in findUiObject()
201 Log.e(TAG, "Error in looking for " + selector, e); in findUiObject()
206 Log.e(TAG, "Unable to find " + selector); in findUiObject()
273 private static UiObject2 waitForObject(BySelector selector) { in waitForObject() argument
275 return uiDevice.wait(Until.findObject(selector), PERMISSION_DIALOG_WAIT_MS); in waitForObject()
/cts/tests/tests/security/src/android/security/cts/
DBasePermissionUiTest.kt112 protected fun waitFindObject(selector: BySelector): UiObject2 { in <lambda>()
114 return findObjectWithRetry({ t -> UiAutomatorUtils.waitFindObject(selector, t) })!! in <lambda>()
117 protected fun waitFindObject(selector: BySelector, timeoutMillis: Long): UiObject2 { in <lambda>()
119 return findObjectWithRetry({ t -> UiAutomatorUtils.waitFindObject(selector, t) }, in <lambda>()
123 protected fun waitFindObjectOrNull(selector: BySelector): UiObject2? { in <lambda>()
125 return findObjectWithRetry({ t -> UiAutomatorUtils.waitFindObjectOrNull(selector, t) }) in <lambda>()
128 protected fun waitFindObjectOrNull(selector: BySelector, timeoutMillis: Long): UiObject2? { in <lambda>()
130 return findObjectWithRetry({ t -> UiAutomatorUtils.waitFindObjectOrNull(selector, t) }, in <lambda>()
156 protected fun click(selector: BySelector, timeoutMillis: Long = 20_000) { in <lambda>()
157 waitFindObject(selector, timeoutMillis).click() in <lambda>()
[all …]
/cts/hostsidetests/securitybulletin/test-apps/CVE-2022-20353/src/android/security/cts/CVE_2022_20353/
DDeviceTest.java52 private boolean clickUiObject(BySelector selector) { in clickUiObject() argument
54 mDevice.wait(Until.hasObject(selector), mResources.getInteger(R.integer.timeoutMs)); in clickUiObject()
56 mDevice.findObject(selector).click(); in clickUiObject()
88 BySelector selector = By.text(text); in testDefaultRingtonePreference() local
90 clickUiObject(selector)); in testDefaultRingtonePreference()
93 selector = By.text(text); in testDefaultRingtonePreference()
95 clickUiObject(selector)); in testDefaultRingtonePreference()
98 selector = By.res(resId); in testDefaultRingtonePreference()
100 clickUiObject(selector)); in testDefaultRingtonePreference()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-21249/test-app/src/android/security/cts/CVE_2023_21249_test/
DDeviceTest.java89 BySelector selector = in testPocCVE_2023_21249() local
126 .that(clickUiObject(uiDevice, selector)) in testPocCVE_2023_21249()
131 if (!uiDevice.wait(Until.gone(selector), TIMEOUT_MS)) { in testPocCVE_2023_21249()
132 clickUiObject(uiDevice, selector); in testPocCVE_2023_21249()
183 private boolean clickUiObject(UiDevice uiDevice, BySelector selector) throws Exception { in clickUiObject() argument
184 boolean objectFound = uiDevice.wait(Until.hasObject(selector), TIMEOUT_MS); in clickUiObject()
186 UiObject2 uiobject = uiDevice.findObject(selector); in clickUiObject()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2022-20116/src/android/security/cts/CVE_2022_20116/
DDeviceTest.java61 private boolean clickUiObject(BySelector selector) { in clickUiObject() argument
63 mDevice.wait(Until.hasObject(selector), getIntegerRes(R.integer.timeoutMs)); in clickUiObject()
65 mDevice.findObject(selector).click(); in clickUiObject()
81 BySelector selector = By.res(mContext.getString(R.string.callChipResId)); in testOngoingCallController() local
82 clickUiObject(selector); in testOngoingCallController()
/cts/tests/tests/sharesheet/src/android/sharesheet/cts/
DCtsNfcResolverDeviceTest.java378 private void waitAndAssertFound(BySelector selector) { in waitAndAssertFound() argument
379 assertNotNull(mSharesheet.wait(Until.findObject(selector), in waitAndAssertFound()
386 private void waitAndAssertFoundOnDevice(BySelector selector) { in waitAndAssertFoundOnDevice() argument
387 assertNotNull(mDevice.wait(Until.findObject(selector), WAIT_AND_ASSERT_FOUND_TIMEOUT_MS)); in waitAndAssertFoundOnDevice()
396 private void waitAndAssertNotFound(BySelector selector) { in waitAndAssertNotFound() argument
397 mSharesheet.wait(Until.gone(selector), WAIT_AND_ASSERT_NOT_FOUND_TIMEOUT_MS); in waitAndAssertNotFound()
398 assertNull(mSharesheet.findObject(selector)); in waitAndAssertNotFound()
404 private void waitAndAssertNotFoundOnDevice(BySelector selector) { in waitAndAssertNotFoundOnDevice() argument
405 mDevice.wait(Until.gone(selector), WAIT_AND_ASSERT_NOT_FOUND_TIMEOUT_MS); in waitAndAssertNotFoundOnDevice()
406 assertNull(mDevice.findObject(selector)); in waitAndAssertNotFoundOnDevice()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-21254/test-app/src/android/security/cts/CVE_2023_21254_test/
DDeviceTest.java89 BySelector selector = in testPocCVE_2023_21254() local
123 .that(uiDevice.wait(Until.hasObject(selector), uiTimeoutMs)) in testPocCVE_2023_21254()
125 uiDevice.findObject(selector).click(); in testPocCVE_2023_21254()
128 if (!uiDevice.wait(Until.gone(selector), uiTimeoutMs)) { in testPocCVE_2023_21254()
129 uiDevice.findObject(selector).click(); in testPocCVE_2023_21254()
/cts/hostsidetests/devicepolicy/app/PackageInstaller/src/com/android/cts/packageinstaller/
DManualPackageInstallTest.java125 BySelector selector = getPopUpImageSelector(); in automateDismissInstallBlockedDialog() local
126 mDevice.wait(Until.hasObject(selector), AUTOMATOR_WAIT_TIMEOUT); in automateDismissInstallBlockedDialog()
127 UiObject2 icon = mDevice.findObject(selector); in automateDismissInstallBlockedDialog()
128 assertNotNull("Policy transparency dialog icon not found: " + selector, icon); in automateDismissInstallBlockedDialog()
/cts/hostsidetests/devicepolicy/app/common/src/com/android/cts/devicepolicy/
DPermissionUtils.java240 BySelector selector = By in findPermissionPromptButton() local
243 Log.v(LOG_TAG, "trying " + selector); in findPermissionPromptButton()
244 device.wait(Until.hasObject(selector), 5000); in findPermissionPromptButton()
245 UiObject2 button = device.findObject(selector); in findPermissionPromptButton()
282 BySelector selector = By in findPermissionPromptButtonAutomotive() local
286 Log.v(LOG_TAG, "selector: " + selector); in findPermissionPromptButtonAutomotive()
287 device.wait(Until.hasObject(selector), 5000); in findPermissionPromptButtonAutomotive()
288 UiObject2 button = device.findObject(selector); in findPermissionPromptButtonAutomotive()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-20955/test-app/src/android/security/cts/CVE_2023_20955_test/
DDeviceTest.java52 private void waitAndClick(BySelector selector) { in waitAndClick() argument
53 assumeTrue(mContext.getString(R.string.msgNotFoundTxt, selector.toString()), in waitAndClick()
54 mDevice.wait(Until.hasObject(selector), TIMEOUT_MS)); in waitAndClick()
55 mDevice.findObject(selector).click(); in waitAndClick()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0523/src/android/security/cts/CVE_2021_0523/
DDeviceTest.java92 BySelector selector = By.text(pattern); in testOverlayButtonPresence() local
94 if (!mDevice.wait(Until.hasObject(selector.depth(0)), LAUNCH_TIMEOUT_MS)) { in testOverlayButtonPresence()
109 assertNull(message, mDevice.findObject(selector)); in testOverlayButtonPresence()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2024-23707/src/android/security/cts/CVE_2024_23707/
DDeviceTest.java105 private boolean clickUiObject(UiDevice uiDevice, BySelector selector) throws Exception { in clickUiObject() argument
106 boolean objectFound = uiDevice.wait(Until.hasObject(selector), 5000 /* timeout */); in clickUiObject()
108 UiObject2 uiobject = uiDevice.findObject(selector); in clickUiObject()
/cts/tests/tests/packageinstaller/nopermission/src/android.packageinstaller.nopermission.cts/
DNoPermissionTests.kt133 val selector = By.res(PACKAGE_INSTALLER_PACKAGE_NAME, INSTALL_CONFIRM_TEXT_ID) in <lambda>() constant
134 assertTrue(errorMessage, uiDevice.wait(Until.hasObject(selector), WAIT_FOR_UI_TIMEOUT)) in <lambda>()
139 val selector = By.res(PACKAGE_INSTALLER_PACKAGE_NAME, INSTALL_CONFIRM_TEXT_ID) in <lambda>() constant
140 assertFalse(errorMessage, uiDevice.wait(Until.hasObject(selector), WAIT_FOR_UI_TIMEOUT)) in <lambda>()
/cts/tests/inputmethod/util/src/android/view/inputmethod/cts/util/
DTestWebView.java74 final BySelector selector = By.text("Editor: "); in getInput() local
77 label = timeout.run("waitForObject(" + selector + ")", in getInput()
78 () -> mUiDevice.findObject(selector)); in getInput()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0685/src/android/security/cts/CVE_2021_0685/
DDeviceTest.java63 BySelector selector = By.pkg(TEST_PKG); in testPackageElementPresence() local
67 assertNotNull(message, mDevice.findObject(selector)); in testPackageElementPresence()
/cts/hostsidetests/securitybulletin/test-apps/TestBluetoothDiscoverable/src/android/security/cts/TestBluetoothDiscoverable/
DPocActivity.java68 BySelector selector = By.text(textPattern); in onCreate() local
70 uiDevice.wait(Until.hasObject(selector), getInteger(R.integer.timeoutMs)); in onCreate()
73 UiObject2 uiObject = uiDevice.findObject(selector); in onCreate()
/cts/tests/tests/security/src/android/security/cts/CVE_2022_20429/
DPocActivity.java71 BySelector selector = By.text(textPattern); in onResume() local
74 Until.hasObject(selector), getInteger(R.integer.cve_2022_20429_timeoutMs)); in onResume()
77 UiObject2 uiObject = uiDevice.findObject(selector); in onResume()

123