Since the update, I am getting an error in a way of making API request that is forcing me to change the way of making API calls. Earlier I was using ‘findtestobject’ for API’s and now a new update is forcing me to change my code throughout the project. Not even sure if the new way of declaration will even work properly.
Please advise as I have not changed anything and the new update 7.9.1 has broken things for me that was working well and good.
Tried few things - I also tried creating a new project just to check just incase my main project has any issues. Seems like even the new project is having the same issues.
I have found out a way to make Katalon Studio stop complaining.
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.model.FailureHandling
import com.kms.katalon.core.testobject.RequestObject
import com.kms.katalon.core.testobject.ResponseObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
ResponseObject test = WS.sendRequestAndVerify(
(RequestObject)findTestObject("New Request"), FailureHandling.STOP_ON_FAILURE)
I explicitly casted a TestObject instance to RequestObject.
In my humble opinion, Katalon should have provided com.kms.katalon.core.testobject.ObjectRepository.findRequestObject method which returns an instance of RequestObject. If so, I could write:
Thanks, @kazurayam for the workaround, but this will also force me to change my references at multiple places and that looks like a huge task at this point unless there is any other way to ‘replace all’ kind of thing that I can use.