println("getContentType: " + response.getContentType()) FAILED.
Reason:
groovy.lang.MissingPropertyException: No such property: response for class: Script1547660508279
at ProofOfConcept.run(ProofOfConcept:17)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:97)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1547691093050.run(TempTestCase1547691093050.groovy:22)
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
Here you are passing an instance of java.util.List as the 2nd param. This is wrong. As document describes, the 2nd and the 3rd argument to the verifyElementPropertyValue should be String.
We are trying to do a proof of concept to purchase the Katalon tool.
I need to at least build GET, POST, PUT, DELETE calls, so I am trying my best. I like the tool but just really trying to figure out how it can help our team.
This is actually the modified one, since I cannot post the original one since I do not know if I can post the original one. I can ask my higher ups, If I can do that. Kindly wait until I get a nod from them.
I am sorry, I couldn’t get a nod to post it openly in the forum. Thank you very much and Appreciate your help. However, I will keep trying to see in this forum, if someone has the same problem.
Hi, I am facing a problem setting the Element locator for my JSON data. Code and JSON data are given below. Can any one help me here ? Code***************************************
response = WS.sendRequest(findTestObject(‘From my object repository’))
WS.verifyResponseStatusCode(response, 200)
WS.verifyElementPropertyValue(response, ‘result.resultCode’, ‘SUCCESS’) JSON Data******
{
“result”:{
“resultStatus”:“S”,
“resultCode”:“SUCCESS”,
“resultMessage”:“success”
},
“authExpiryTime”:“2021-08-15”,
“paymentId”:“123456”
}