Hi Guys, I’m facing a similar problem, but with a WS Request object
I need to replace an object property value that is in the body of my request with the variable that I had generate in my script, before send the request. (Because for the criation of users, the property cannot be repeated)
Until here, i’ve tried two ways to deal with it:
object = (findTestObject(‘Users/ValidaCriacaoUsuario/CriaUsuarioComSucesso’))
object.findProperty(‘CPF’).setValue(cpf)
object.findProperty(‘CPF’).setActive(true)
when i run, i got this error:
05-29-2018 04:55:56 PM - [ERROR] - Test Cases/Users/ValidaCriacaoUsuario FAILED because (of) java.lang.NullPointerException: Cannot invoke method setValue() on null object
And i don’t know why i got this error, because i have a object with this propertys in the body.
The second way i tried unsuccessfully, was using a WebUI keyword, and i don’t got any error, but it is not working too (the value in the property keep the same):
WebUI.modifyObjectProperty(object, ‘CPF’, ‘equals’, cpf, true, FailureHandling.STOP_ON_FAILURE)
//WebUI.modifyObjectProperty(object, ‘Email’, ‘equals’, strng, true, FailureHandling.STOP_ON_FAILURE)
Can anyone help me ? I’m new in katalon and don’t know if there is any way to do this or it can be a limitation of the tool once the body gets ‘fixed’ on the object
Thanks!!