diff --git a/api/@ohos.UiTest.d.ts b/api/@ohos.UiTest.d.ts index 5d8b1069b0130a9ee1028b6cd14722b481ddd1cb..6c9d35fd9cd8ab09edfaec1a3d85323bed4e6160 100755 --- a/api/@ohos.UiTest.d.ts +++ b/api/@ohos.UiTest.d.ts @@ -1540,9 +1540,8 @@ declare interface UIEventObserver { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since 11 * @test - * @arkts 1.1&1.2 */ once(type: 'toastShow', callback: Callback): void; @@ -1564,11 +1563,40 @@ declare interface UIEventObserver { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since 11 * @test - * @arkts 1.1&1.2 */ once(type: 'dialogShow', callback: Callback): void; + + /** + * @arkts 1.2 + */ + overload once { onceToastShow, onceDialogShow }; + /** + * Listen for toast show once + * + * @param { 'toastShow' } type -'toastShow'. + * @param { Callback } callback - function, returns the monitored UIElementInfo. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Test.UiTest + * @since 20 + * @test + * @arkts 1.2 + */ + onceToastShow(type: 'toastShow', callback: Callback): void; + + /** + * Listen for dialog show once + * + * @param { 'dialogShow' } type - 'dialogShow'. + * @param { Callback } callback - function, returns the monitored UIElementInfo. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Test.UiTest + * @since 20 + * @test + * @arkts 1.2 + */ + onceDialogShow(type: 'dialogShow', callback: Callback): void; } /**