Good Day,
Given
1.I’m able to print CPTCodeId in my method “clickSaveAddCPTActive” *See below

- WS.sendRequest is working if I set manually the variable and running manually the post request *See below
HTTP Body
query CPTCode{
cptCodes(filter: {patternMatch: EXACT, code: "${code}"}) {
code
description
validityStartDate
validityEndDate
}
}
Variable in WS
Result
Problem
- Now When Im running my testcase specially for this method which I’m trying to parameterizing the default value of variable “code” in WS
I’m getting the error below in console and I’m not able to set the value of variable “CPTCodeId” to the WS variable default value
![]()
{"errors":[{"message":"Query variables must be a null or an object."}],"extensions":{"tracing":{"version":1,"startTime":"2022-08-31T16:37:38.699834Z","endTime":"2022-08-31T16:37:38.700100Z","duration":263718,"execution":{"resolvers":[]}}}}
Here’s my script
Expectation
Whatever the value of variable CPTCodeId should be pass to the variable code in WS dynamically
Help will be appreciated thanks!






