AddReturnValue Method

Class

QapJava.

Action

Adds an object to the list of values to be returned by Java class back to 4Test.

Syntax

QapJava.addReturnValue(aRetObj);
Variable Description
aRetObj

Object to be added to the list of items to be returned by the Java class to 4Test. OBJECT.

  • Currently, aRetObj can be a BOOLEAN, INTEGER, REAL, or STRING value only.

Notes

The objects will be returned in the order in which they are added to the return list (first in, first out). QapJava.addReturnValue can optionally add:

  • The first object to the list of values to be returned by the Java class back to 4Test.
  • The second object to the list of values to be returned by the Java class back to 4Test.
  • The third object to the list of values to be returned by the Java class back to 4Test.

Example

import segue.qapjava.QapJava;
...
OBJECT objRef;
CHECKBOX cb;
STRING stringArg;
BOOLEAN boolArg;
...
objRef = QapJava.getObject();
...
if (objRef instanceof Checkbox){
 cb = (Checkbox)objRef;
}
...
stringArg = cb.getLabel();
QapJava.addReturnValue( (String)stringArg);
boolArg = new Boolean(cb.getState());
QapJava.addReturnValue( (Boolean)boolArg);
...
}