Good Day,
I’m new to automation and don’t have much experience and I only rely on google and youtube
Currently I’m working on a datepicker that user cannot manually input as the attribute is readonly
And I just want to remove the attribute “readonly” but it seems not working after I run my script
Script
WebUI.click(findTestObject('ordersPage/dtpCreationDateF'))
WebUI.removeObjectProperty(findTestObject('ordersPage/dtpCreationDateF'), 'readonly')
WebUI.setText(findTestObject('ordersPage/dtpCreationDateF'), '1/31/2022')
Object and HTML
Object Xpath
//div[@class='v-text-field__slot']/label[contains(text(),'Creation Date From')] /following-sibling:: input[@readonly='readonly']
After Execution
It say’s for
WebUI.removeObjectProperty(findTestObject('ordersPage/dtpCreationDateF'), 'readonly')
01-31-2022 12:11:32 PM removeObjectProperty(findTestObject(“ordersPage/dtpCreationDateF”), “readonly”)
Elapsed time: 0.062s
Remove property of object successfully
and after I set text it fails
WebUI.setText(findTestObject('ordersPage/dtpCreationDateF'), '1/31/2022')
And when I checked again the object attribute the “readonly” still there.
Is there any way I can remove the attribute readonly so I can input manually a date?
Example will be appreciated if have
Thanks!