diff --git a/arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/TextPickerPage.ets b/arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/TextPickerPage.ets index 40c4363a41be290780db752caef634b119ca533e..13b3933092a86b23fd9fb8e287e9710d9624f953 100644 --- a/arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/TextPickerPage.ets +++ b/arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/TextPickerPage.ets @@ -60,7 +60,7 @@ struct TextPickerPage { this.getValue = value this.getIndex = index }) - Text(this.getValue + ': ' + this.getIndex.toString()).fontSize(20).key('text') + Text(this.getValue + ': ' + this.getIndex.toString()).fontSize(20).key('textContent1') } } } \ No newline at end of file diff --git a/arkui/ace_ets_component_ui/entry/src/main/ets/test/TextPickerJsunit.test.ets b/arkui/ace_ets_component_ui/entry/src/main/ets/test/TextPickerJsunit.test.ets index 01e026326e20829bde4250f2ee096a3f728e0593..1412b1dbc07569f33f23e528be33790845531da5 100644 --- a/arkui/ace_ets_component_ui/entry/src/main/ets/test/TextPickerJsunit.test.ets +++ b/arkui/ace_ets_component_ui/entry/src/main/ets/test/TextPickerJsunit.test.ets @@ -61,7 +61,7 @@ export default function TextPickerJsunit() { // Get the content of Initial value let driver = await UiDriver.create() - let strJson1 = getInspectorByKey('text'); + let strJson1 = getInspectorByKey('textContent1'); let obj1 = JSON.parse(strJson1); console.info("[TextPickerJsunit_0100] obj1: " + JSON.stringify(obj1)); expect(obj1.$attrs.content).assertEqual('value: 0'); @@ -110,7 +110,7 @@ export default function TextPickerJsunit() { await CommonFunc.sleep(1000); let driver = await UiDriver.create() await driver.swipe(Math.round(right / 2), Math.round(bottom * 2 / 3), Math.round(right / 2), Math.round(bottom / 3)); - let strJson = getInspectorByKey('text'); + let strJson = getInspectorByKey('textContent1'); let obj = JSON.parse(strJson); console.info("[TextPickerJsunit_0300] obj: " + JSON.stringify(obj)); expect(obj.$attrs.content == 'value: 0').assertFalse();