check, member, response, api, request, send, soap, rest, get, post, put, delete

Method CheckMemberResponse

API

Checks property of object with a given value

Watch this video to learn how to use this method

Have a problem with playback?
CheckMemberResponse Method checks property of object with a given value. CheckMemberResponse contains three parameters: path to the object property, value to compare with object property value and optional boolean parameter report. Before use this function you have to call Execute Method. Lets take an example from GetMemberResponse method: We have a method which returns Book object by ID. We will check book title value with value from the response below. To get more information about path usage please watch our video "how to use paths for getting API method response". Now lets try to set invalid book title.

Usage

Function CheckMemberResponse(
    String Path,
    String Value,
    Boolean Report [Optional]
)

GetBookById

Check...Response

Title

Book Title

True

Path

Value

Report

Parameters

Path

Type: String

Path to the object: User[5].Information.Awards

Value

Type: String

Value

Report (optional)

Type: Boolean

Default value: True

Report Result

Returns

True if response property value equals to value parameter, otherwise - false

Example

VBScript

Server("API Server").Method("GetBookById").Execute
Server("API Server").Method("GetBookById").CheckMemberResponse "Title", "Best Test Automation Software", True

JavaScript

Server("API Server").Method("GetBookById").Execute();
Server("API Server").Method("GetBookById").CheckMemberResponse("Title", "Best Test Automation Software", true);

GetBookById

Execute

GetBookById

Check...Response

Title

Book Title

True

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227