@CompileStatic class WSBuiltInKeywords extends BuiltinKeywords
Constructor and description |
---|
WSBuiltInKeywords
() |
Type Params | Return Type | Name and description |
---|---|---|
|
static boolean |
containsString(ResponseObject response, String string, boolean useRegex, FailureHandling flowControl) Verify that an expected text appear in the returned data from a web service call |
|
static boolean |
containsString(ResponseObject response, String string, boolean useRegex) Verify that an expected text appear in the returned data from a web service call |
|
static Object |
getElementPropertyValue(ResponseObject response, String locator, FailureHandling flowControl) Get property value of an element (defined by a locator) in the returned data from a web service call |
|
static Object |
getElementPropertyValue(ResponseObject response, String locator) Get property value of an element (defined by a locator) in the returned data from a web service call |
|
static String |
getElementText(ResponseObject response, String locator, FailureHandling flowControl) Get text of the element (defined by a locator) which appears in the returned data from a web service call |
|
static String |
getElementText(ResponseObject response, String locator) Get text of the element (defined by a locator) which appears in the returned data from a web service call |
|
static int |
getElementsCount(ResponseObject response, String locator, FailureHandling flowControl) Get the number of expected elements (JSON/XML) in the response (output) of a web service call |
|
static int |
getElementsCount(ResponseObject response, String locator) Get the number of expected elements (JSON/XML) in the response (output) of a web service call |
|
static boolean |
getHarFileGeneration() Checks HAR file generation option is enabled or not. |
|
static boolean |
getHarFileGeneration(FailureHandling flowControl) Checks HAR file generation option is enabled or not. |
|
static int |
getResponseStatusCode(ResponseObject responseObject, FailureHandling flowControl) Get status code in the returned data from a web service call |
|
static int |
getResponseStatusCode(ResponseObject responseObject) Get status code in the returned data from a web service call |
|
static ResponseObject |
sendRequest(RequestObject request, FailureHandling flowControl) Send a HTTP Request to web server |
|
static ResponseObject |
sendRequest(RequestObject request) Send a HTTP Request to web server |
|
static ResponseObject |
sendRequestAndVerify(RequestObject request, FailureHandling flowControl) Send a HTTP Request to web server and verify the response |
|
static ResponseObject |
sendRequestAndVerify(RequestObject request) Send a HTTP Request to web server and verify the response |
|
static void |
setHarFileGeneration(boolean enable) Katalon Studio will generate HAR file for each Web Service request by default. |
|
static void |
setHarFileGeneration(boolean enable, FailureHandling flowControl) Katalon Studio will generate HAR file for each Web Service request by default. |
|
static boolean |
validateGraphqlRequestAgainstSchema(RequestObject request, String graphqlSchema, FailureHandling flowControl) Validate a GraphQL request body against a GraphQL schema |
|
static boolean |
validateGraphqlRequestAgainstSchema(RequestObject request, String graphqlSchema) Validate a GraphQL request body against a GraphQL schema |
|
static boolean |
validateJsonAgainstSchema(String jsonObject, String jsonSchema, FailureHandling flowControl) Validate a JSON object against a JSON schema |
|
static boolean |
validateJsonAgainstSchema(String jsonObject, String jsonSchema) Validate a JSON object against a JSON schema |
|
static boolean |
validateJsonAgainstSchema(ResponseObject response, String jsonSchema) Validate a response against a JSON schema |
|
static boolean |
validateJsonAgainstSchema(ResponseObject response, String jsonSchema, FailureHandling flowControl) Validate a response against a JSON schema |
|
static boolean |
validateOpenAPIAgainstSpecification(RequestObject request, String specSrc) Validate an OpenAPI/Swagger request against an OpenAPI/Swagger specification |
|
static boolean |
validateOpenAPIAgainstSpecification(RequestObject request, String specSrc, FailureHandling flowControl) Validate an OpenAPI/Swagger request against an OpenAPI/Swagger specification |
|
static boolean |
validateOpenAPIAgainstSpecification(ResponseObject response, RequestObject request, String specSrc) Validate an OpenAPI/Swagger response against an OpenAPI/Swagger specification |
|
static boolean |
validateOpenAPIAgainstSpecification(ResponseObject response, RequestObject request, String specSrc, FailureHandling flowControl) Validate an OpenAPI/Swagger response against an OpenAPI/Swagger specification |
|
static boolean |
validateXmlAgainstSchema(String xmlObject, String xmlSchema, FailureHandling flowControl) Validate an XML object against an XML schema |
|
static boolean |
validateXmlAgainstSchema(String xmlObject, String xmlSchema) Validate an XML object against an XML schema |
|
static boolean |
validateXmlAgainstSchema(ResponseObject response, String xmlSchema) Validate a response against an XML schema |
|
static boolean |
validateXmlAgainstSchema(ResponseObject response, String xmlSchema, FailureHandling flowControl) Validate a response against an XML schema |
|
static boolean |
verifyElementPropertyValue(ResponseObject response, String locator, Object value, FailureHandling flowControl) Verify that there is an element with expected property value appear in the returned data from a web service call |
|
static boolean |
verifyElementPropertyValue(ResponseObject response, String locator, Object value) Verify that there is an element with expected property value appear in the returned data from a web service call |
|
static boolean |
verifyElementText(ResponseObject response, String locator, String text, FailureHandling flowControl) Verify that there is an element with expected text appear in the returned data from a web service call |
|
static boolean |
verifyElementText(ResponseObject response, String locator, String text) Verify that there is an element with expected text appear in the returned data from a web service call |
|
static boolean |
verifyElementsCount(ResponseObject response, String locator, int count, FailureHandling flowControl) Verify number of expected elements (JSON/XML) in the response (output) of a web service call |
|
static boolean |
verifyElementsCount(ResponseObject response, String locator, int count) Verify number of expected elements (JSON/XML) in the response (output) of a web service call |
|
static boolean |
verifyResponseStatusCode(ResponseObject responseObject, int expectedStatusCode, FailureHandling flowControl) Verify status code in the returned data from a web service call |
|
static boolean |
verifyResponseStatusCode(ResponseObject responseObject, int expectedStatusCode) Verify status code in the returned data from a web service call |
|
static boolean |
verifyResponseStatusCodeInRange(ResponseObject responseObject, int fromStatusCode, int toStatusCode, FailureHandling flowControl) Verify status code valid in a range of status codes in the returned data from a web service call |
|
static boolean |
verifyResponseStatusCodeInRange(ResponseObject responseObject, int fromStatusCode, int toStatusCode) Verify status code valid in a range of status codes in the returned data from a web service call |
Methods inherited from class | Name |
---|---|
class BuiltinKeywords |
callTestCase, callTestCase, comment, concatenate, concatenate, delay, delay, verifyCheckpoint, verifyCheckpoint, verifyEqual, verifyEqual, verifyGreaterThan, verifyGreaterThan, verifyGreaterThanOrEqual, verifyGreaterThanOrEqual, verifyLessThan, verifyLessThan, verifyLessThanOrEqual, verifyLessThanOrEqual, verifyMatch, verifyMatch, verifyNotEqual, verifyNotEqual, verifyNotMatch, verifyNotMatch |
Verify that an expected text appear in the returned data from a web service call
response
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)string
- the text you want to look foruseRegex
- use regular expression or notVerify that an expected text appear in the returned data from a web service call
response
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)string
- the text you want to look foruseRegex
- use regular expression or notGet property value of an element (defined by a locator) in the returned data from a web service call
response
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)locator
- an expression Katalon will use to go through and look for expected element(s), please refer to our user guide for how to write itGet property value of an element (defined by a locator) in the returned data from a web service call
response
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)locator
- an expression Katalon will use to go through and look for expected element(s), please refer to our user guide for how to write itGet text of the element (defined by a locator) which appears in the returned data from a web service call
response
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)locator
- an expression Katalon will use to go through and look for expected element(s), please refer to our user guide for how to write itGet text of the element (defined by a locator) which appears in the returned data from a web service call
response
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)locator
- an expression Katalon will use to go through and look for expected element(s), please refer to our user guide for how to write itGet the number of expected elements (JSON/XML) in the response (output) of a web service call
response
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)locator
- an expression Katalon will use to go through and look for expected element(s), please refer to our user guide for how to write itGet the number of expected elements (JSON/XML) in the response (output) of a web service call
response
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)locator
- an expression Katalon will use to go through and look for expected element(s), please refer to our user guide for how to write itChecks HAR file generation option is enabled or not.
Checks HAR file generation option is enabled or not.
flowControl
- FailureHandlingGet status code in the returned data from a web service call
responseObject
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)Get status code in the returned data from a web service call
responseObject
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)Send a HTTP Request to web server
request
- the object represents for a HTTP Request, user need to define it from Object Repository->New->Web Service Request, and get it by ObjectRepository.findRequestObject("requestObjectId")Send a HTTP Request to web server
request
- the object represents for a HTTP Request, user need to define it from Object Repository->New->Web Service Request, and get it by ObjectRepository.findRequestObject("requestObjectId")Send a HTTP Request to web server and verify the response
request
- the object represents for a HTTP Request, user need to define it from Object Repository->New->Web Service Request, and get it by ObjectRepository.findRequestObject("requestObjectId")Send a HTTP Request to web server and verify the response
request
- the object represents for a HTTP Request, user need to define it from Object Repository->New->Web Service Request, and get it by ObjectRepository.findRequestObject("requestObjectId")Katalon Studio will generate HAR file for each Web Service request by default. This keyword will allow us can enable or disable HAR file generations on demand.
enable
- true if enable HAR file generation. Otherwise, false.Katalon Studio will generate HAR file for each Web Service request by default. This keyword will allow us can enable or disable HAR file generations on demand.
enable
- true if enable HAR file generation. Otherwise, false.flowControl
- FailureHandlingValidate a GraphQL request body against a GraphQL schema
request
- The request object to be validated, of type RequestObjectgraphqlSchema
- The GraphQL schema to validate against, which can be a JSON String, an URL, or a File pathflowControl
- Specify failure handling schema to determine whether the execution should be allowed to continue or stop, of type FailureHandlingValidate a GraphQL request body against a GraphQL schema
request
- The request object to be validated, of type RequestObjectgraphqlSchema
- The GraphQL schema to validate against, which can be a JSON String, an URL, or a File pathValidate a JSON object against a JSON schema
jsonObject
- The JSON object to be validated, of type StringjsonSchema
- The JSON schema to validate against, which can be a JSON String, an URL, or a File pathflowControl
- Specify failure handling schema to determine whether the execution should be allowed to continue or stop, of type FailureHandlingValidate a JSON object against a JSON schema
jsonObject
- The JSON object to be validated, of type StringjsonSchema
- The JSON schema to validate against, which can be a JSON String, an URL, or a File pathValidate a response against a JSON schema
response
- The response object to be validated, of type ResponseObjectjsonSchema
- The JSON schema to validate against, which can be a JSON String, an URL, or a File pathValidate a response against a JSON schema
response
- The response object to be validated, of type ResponseObjectjsonSchema
- The JSON schema to validate against, which can be a JSON String, an URL, or a File pathflowControl
- Specify failure handling schema to determine whether the execution should be allowed to continue or stop, of type FailureHandlingValidate an OpenAPI/Swagger request against an OpenAPI/Swagger specification
request
- Specify the request object that needs to be validatedspecSrc
- Specify the OpenAPI/Swagger specification used to validate the OpenAPI/Swagger objectValidate an OpenAPI/Swagger request against an OpenAPI/Swagger specification
request
- Specify the request object that needs to be validatedspecSrc
- Specify the OpenAPI/Swagger specification used to validate the OpenAPI/Swagger objectflowControl
- Specify failure handling schema to determine whether the execution should be allowed to continue or stopValidate an OpenAPI/Swagger response against an OpenAPI/Swagger specification
response
- Specify the response object that needs to be validatedrequest
- Specify the request for the response that needs to be validatedspecSrc
- Specify the OpenAPI/Swagger specification used to validate the OpenAPI/Swagger objectValidate an OpenAPI/Swagger response against an OpenAPI/Swagger specification
response
- Specify the response object that needs to be validatedrequest
- Specify the request for the response that needs to be validatedspecSrc
- Specify the OpenAPI/Swagger specification used to validate the OpenAPI/Swagger objectflowControl
- Specify failure handling schema to determine whether the execution should be allowed to continue or stopValidate an XML object against an XML schema
xmlObject
- The XML object to be validatedxmlSchema
- The XML schema to validate against, which can be a JSON String, an URL, or a File pathflowControl
- Specify failure handling schema to determine whether the execution should be allowed to continue or stop, of type FailureHandlingValidate an XML object against an XML schema
xmlObject
- The XML object to be validatedxmlSchema
- The XML schema to validate against, which can be a JSON String, an URL, or a File pathValidate a response against an XML schema
response
- The response object to be validated, of type ResponseObjectxmlSchema
- The XML schema to validate against, which can be a JSON String, an URL, or a File pathValidate a response against an XML schema
response
- The response object to be validated, of type ResponseObjectxmlSchema
- The XML schema to validate against, which can be a JSON String, an URL, or a File pathflowControl
- Specify failure handling schema to determine whether the execution should be allowed to continue or stop, of type FailureHandlingVerify that there is an element with expected property value appear in the returned data from a web service call
response
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)locator
- an expression Katalon will use to go through and look for expected element(s), please refer to our user guide for how to write itvalue
- the expected value of element you want to verify in the responded data (usually is JSON/XML)Verify that there is an element with expected property value appear in the returned data from a web service call
response
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)locator
- an expression Katalon will use to go through and look for expected element(s), please refer to our user guide for how to write itvalue
- the expected value of element you want to verify in the responded data (usually is JSON/XML)Verify that there is an element with expected text appear in the returned data from a web service call
response
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)locator
- an expression Katalon will use to go through and look for expected element(s), please refer to our user guide for how to write ittext
- the expected text of element you want to verify in the responded data (usually is JSON/XML)Verify that there is an element with expected text appear in the returned data from a web service call
response
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)locator
- an expression Katalon will use to go through and look for expected element(s), please refer to our user guide for how to write ittext
- the expected text of element you want to verify in the responded data (usually is JSON/XML)Verify number of expected elements (JSON/XML) in the response (output) of a web service call
response
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)locator
- an expression Katalon will use to go through and look for expected element(s), please refer to our user guide for how to write itcount
- the expected number of element(s) should appear in the responded data (usually is JSON/XML)Verify number of expected elements (JSON/XML) in the response (output) of a web service call
response
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)locator
- an expression Katalon will use to go through and look for expected element(s), please refer to our user guide for how to write itcount
- the expected number of element(s) should appear in the responded data (usually is JSON/XML)Verify status code in the returned data from a web service call
responseObject
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)expectedStatusCode
- the expected status codeflowControl
- FailureHandlingVerify status code in the returned data from a web service call
responseObject
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)expectedStatusCode
- the expected status codeVerify status code valid in a range of status codes in the returned data from a web service call
responseObject
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)fromStatusCode
- from status codetoStatusCode
- to status codeflowControl
- FailureHandlingVerify status code valid in a range of status codes in the returned data from a web service call
responseObject
- the object represents for a HTTP Response, user can get responded content type, data, header properties (sometimes user may want to get cookie from response header)fromStatusCode
- from status codetoStatusCode
- to status code