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

!15586 翻译完成 15306:js-apis-inner-application-accessibilityExtensionContext.md

Merge pull request !15586 from ester.zhou/TR-15306
...@@ -703,10 +703,10 @@ try { ...@@ -703,10 +703,10 @@ try {
console.log('get attribute value by name success'); console.log('get attribute value by name success');
attributeValue = data; attributeValue = data;
}).catch((err) => { }).catch((err) => {
console.log('failed to get attribute value, because ${JSON.stringify(err)}'); console.error('failed to get attribute value, because ${JSON.stringify(err)}');
}); });
} catch (exception) { } catch (exception) {
console.log('failed to get attribute value, because ${JSON.stringify(exception)}'); console.error('failed to get attribute value, because ${JSON.stringify(exception)}');
} }
``` ```
## AccessibilityElement.attributeValue ## AccessibilityElement.attributeValue
...@@ -749,7 +749,7 @@ try { ...@@ -749,7 +749,7 @@ try {
console.info('get attribute value success'); console.info('get attribute value success');
}); });
} catch (exception) { } catch (exception) {
console.log('failed to get attribute value, because ${JSON.stringify(exception)}'); console.error('failed to get attribute value, because ${JSON.stringify(exception)}');
} }
``` ```
## actionNames ## actionNames
...@@ -775,7 +775,7 @@ rootElement.actionNames().then((data) => { ...@@ -775,7 +775,7 @@ rootElement.actionNames().then((data) => {
console.log('get action names success'); console.log('get action names success');
actionNames = data; actionNames = data;
}).catch((err) => { }).catch((err) => {
console.log('failed to get action names because ${JSON.stringify(err)}'); console.error('failed to get action names because ${JSON.stringify(err)}');
}); });
``` ```
## actionNames ## actionNames
...@@ -843,10 +843,10 @@ try { ...@@ -843,10 +843,10 @@ try {
rootElement.performAction('action').then((data) => { rootElement.performAction('action').then((data) => {
console.info('perform action success'); console.info('perform action success');
}).catch((err) => { }).catch((err) => {
console.log('failed to perform action, because ${JSON.stringify(err)}'); console.error('failed to perform action, because ${JSON.stringify(err)}');
}); });
} catch (exception) { } catch (exception) {
console.log('failed to perform action, because ${JSON.stringify(exception)}'); console.error('failed to perform action, because ${JSON.stringify(exception)}');
} }
``` ```
## performAction ## performAction
...@@ -885,7 +885,7 @@ try { ...@@ -885,7 +885,7 @@ try {
console.info('perform action success'); console.info('perform action success');
}); });
} catch (exception) { } catch (exception) {
console.log('failed to perform action, because ${JSON.stringify(exception)}'); console.error('failed to perform action, because ${JSON.stringify(exception)}');
} }
``` ```
## performAction ## performAction
...@@ -929,7 +929,7 @@ try { ...@@ -929,7 +929,7 @@ try {
console.info('perform action success'); console.info('perform action success');
}); });
} catch (exception) { } catch (exception) {
console.log('failed to perform action, because ${JSON.stringify(exception)}'); console.error('failed to perform action, because ${JSON.stringify(exception)}');
} }
``` ```
## findElement('content') ## findElement('content')
...@@ -965,10 +965,10 @@ try { ...@@ -965,10 +965,10 @@ try {
elements = data; elements = data;
console.log('find element success'); console.log('find element success');
}).catch((err) => { }).catch((err) => {
console.log('failed to find element, because ${JSON.stringify(err)}'); console.error('failed to find element, because ${JSON.stringify(err)}');
}); });
} catch (exception) { } catch (exception) {
console.log('failed to find element, because ${JSON.stringify(exception)}'); console.error('failed to find element, because ${JSON.stringify(exception)}');
} }
``` ```
## findElement('content') ## findElement('content')
...@@ -1004,7 +1004,7 @@ try { ...@@ -1004,7 +1004,7 @@ try {
console.info('find element success'); console.info('find element success');
}); });
} catch (exception) { } catch (exception) {
console.log('failed to find element, because ${JSON.stringify(exception)}'); console.error('failed to find element, because ${JSON.stringify(exception)}');
} }
``` ```
## findElement('focusType') ## findElement('focusType')
...@@ -1040,10 +1040,10 @@ try { ...@@ -1040,10 +1040,10 @@ try {
element = data; element = data;
console.log('find element success'); console.log('find element success');
}).catch((err) => { }).catch((err) => {
console.log('failed to find element, because ${JSON.stringify(err)}'); console.error('failed to find element, because ${JSON.stringify(err)}');
}); });
} catch (exception) { } catch (exception) {
console.log('failed to find element, because ${JSON.stringify(exception)}'); console.error('failed to find element, because ${JSON.stringify(exception)}');
} }
``` ```
## findElement('focusType') ## findElement('focusType')
...@@ -1079,7 +1079,7 @@ try { ...@@ -1079,7 +1079,7 @@ try {
console.info('find element success'); console.info('find element success');
}); });
} catch (exception) { } catch (exception) {
console.log('failed to find element, because ${JSON.stringify(exception)}'); console.error('failed to find element, because ${JSON.stringify(exception)}');
} }
``` ```
## findElement('focusDirection') ## findElement('focusDirection')
...@@ -1115,10 +1115,10 @@ try { ...@@ -1115,10 +1115,10 @@ try {
element = data; element = data;
console.log('find element success'); console.log('find element success');
}).catch((err) => { }).catch((err) => {
console.log('failed to find element, because ${JSON.stringify(err)}'); console.error('failed to find element, because ${JSON.stringify(err)}');
}); });
} catch (exception) { } catch (exception) {
console.log('failed to find element, because ${JSON.stringify(exception)}'); console.error('failed to find element, because ${JSON.stringify(exception)}');
} }
``` ```
## findElement('focusDirection') ## findElement('focusDirection')
...@@ -1154,6 +1154,6 @@ try { ...@@ -1154,6 +1154,6 @@ try {
console.info('find element success'); console.info('find element success');
}); });
} catch (exception) { } catch (exception) {
console.log('failed to find element, because ${JSON.stringify(exception)}'); console.error('failed to find element, because ${JSON.stringify(exception)}');
} }
``` ```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册