removeObjectProperty doesn't work

I am trying to bypass “required” attribute of an input element at run time. I used below code.

newinputPassword = WebUI.removeObjectProperty(findTestObject(‘input_(required)_j_password’), ‘required’)
WebUI.setText(newinputPassword ‘’)

But it still asks me to fill in the field. Is there anything wrong? I have check if I manually remove the “required” attribute, the field is not mandatory to fill in.
Thanks.

1 Like

Use the below code

newinputPassword = WebUI.removeObjectProperty(findTestObject(‘input_(required)_j_password’), ‘required’)
newinputPassword = WebUI.findTestObject(newinputPassword)
WebUI.setText(newinputPassword, ‘’)

Thank you very much for your reply!
It is my bad. I made typo error.
I will delete this topic because I have found the solution from here:
Unable to remove attribute “readonly” in datepicker - Product Forums / Katalon Studio - Katalon Community

1 Like