The setPageVariable() method sets a page variable on a specified page.

Syntax

bapi.helper.setPageVariable(page, variableName, variableValue, currentPage, mapObjectKeys)

Parameters

page

The specified page to searching through.

This is a parameter of type pageElementRequest.

variableName

String: the desired page variable name.

variableValue

The value that will be set.

currentPage

The browser page object where the request is being ran.

mapObjectKeys

Flag for the option of creating a page variable & value for each corresponding key value pairs that the variableName object has.

For this to work variableName parameter must not receive a value.

Example

bapi.helper.setPageVariable("parent","foo","bar", CURRENT_BROWSER_FORM);
brwFormRoot._vars

bapi.helper.setPageVariable(CURRENT_BROWSER_FORM,"varName","specifiedValue");
CURRENT_BROWSER_FORM._vars