check, response, contains, data, request, send, soap, rest, get, post, put, delete

Method ResponseContains

API

Checks if raw response contains the given string data

Watch this video to learn how to use this method

Have a problem with playback?
ResponseContains method checks if raw response contains the given string data. Prior to use this function you need to insert Execute method. The input of this method is string data parameter. The Output is boolean - true, if response contains string data, and false if not. We know that response contains Author property with value "Unknown". So lets make it as input parameter. We will use messagebox to demonstrate the output. The output show true, lets change string data parameter. The output is false now.

Usage

Function ResponseContains(
    String Str
)

GetCompanyName

ZAP API Method step

ResponseContains

ZAPTEST

Str

Parameters

Str

Type: String

String data

Returns

Boolean result

Example

VBScript

msgbox Server("API Server").Method("GetCompanyName").ResponseContains("ZAPTEST")

JavaScript

alert(Server("API Server").Method("GetCompanyName").ResponseContains("ZAPTEST"));

Comment

Call GetCompanyName method and check if response contains "ZAPTEST"

Script-Less next step

GetCompanyName

ZAP API Method step

ResponseContains

ZAPTEST

Contact Us

1425 Market Blvd Suite 530-230

Roswell, GA 30076, USA

(800) 795-3552