未验证 提交 e76e90d2 编写于 作者: O openharmony_ci 提交者: Gitee

!19612 uitest示例代码更新

Merge pull request !19612 from 周柯/master
......@@ -1198,7 +1198,7 @@ scrollSearch(on: On): Promise\<Component>
```js
async function demo() {
let driver = Driver.create();
let button = await driver.findComponent(ON.type('Scroll'));
let scrollBar = await driver.findComponent(ON.type('Scroll'));
let button = await scrollBar.scrollSearch(ON.text('next page'));
}
```
......@@ -2428,7 +2428,7 @@ createUIEventObserver(): UIEventObserver;
```js
async function demo() {
let driver = Driver.create();
let obeserver = await driver.createUiEventObserve();
let observer = await driver.createUIEventObserver()
}
```
......@@ -2959,6 +2959,7 @@ once(type: 'toastShow', callback: Callback\<UIElementInfo>):void;
```js
async function demo() {
let driver = Driver.create();
let observer = await driver.createUIEventObserver()
let callback = (UIElementInfo)=>{
console.info(UIElementInfo.bundleName)
......@@ -2988,6 +2989,7 @@ once(type: 'dialogShow', callback: Callback\<UIElementInfo>): void;
```js
async function demo() {
let driver = Driver.create();
let observer = await driver.createUIEventObserver()
let callback = (UIElementInfo)=>{
console.info(UIElementInfo.bundleName)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册