From ce14d39fa3ec0a9001e923b2dc32ddcebd771ac2 Mon Sep 17 00:00:00 2001 From: zhouke Date: Mon, 30 May 2022 14:40:07 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20852bbff=20from=20https://gitee.com/zhou?= =?UTF-8?q?-ke-0929/docs/pulls/4643=20=20js-apis-uitest.md=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=A4=B1=E8=B4=A5=E7=A4=BA=E4=BE=8B=E4=BB=A3=E7=A0=81?= =?UTF-8?q?.=20Signed-off-by:=20.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouke --- .../reference/apis/js-apis-uitest.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-uitest.md b/zh-cn/application-dev/reference/apis/js-apis-uitest.md index 3bf5627686..c8766b98cb 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-uitest.md +++ b/zh-cn/application-dev/reference/apis/js-apis-uitest.md @@ -860,7 +860,7 @@ async function demo() { ### UiComponent.scrollSearch -scrollSearch(by:By): Promise\ +scrollSearch(by: By): Promise\ 在控件上滑动查找目标控件(适用于List等支持滑动的控件)。 @@ -926,7 +926,7 @@ async function demo() { ### UiComponent.dragTo9+ -dragTo(by:By): Promise\ +dragTo(target: UiComponent): Promise\ 将控件拖拽至目标控件处。 @@ -934,9 +934,9 @@ dragTo(by:By): Promise\ **参数:** -| 参数名 | 类型 | 必填 | 说明 | -| ------ | ---- | ---- | -------------------- | -| by | By | 是 | 目标控件的属性要求。 | +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ----------- | ---- | ---------- | +| target | UiComponent | 是 | 目标控件。 | **示例:** @@ -944,7 +944,8 @@ dragTo(by:By): Promise\ async function demo() { let driver = UiDriver.create() let button = await driver.findComponent(BY.type('button')) - await button.dragTo(BY.text('hello world')) + let text = await driver.findComponent(BY.text('hello world')) + await button.dragTo(text) } } ``` -- GitLab