IBM Rational Functional Tester
Version 8.1.1000
IBM Rational Functional Tester API Reference

Project Version 2.3

com.rational.test.ft.script
Interface ITestObjectMethodState


public interface ITestObjectMethodState

Provides access to the state of a method call on a TestObject.

Since:
RFT1.0
See Also:
IObjectManagerEventListener

Method Summary
 void findObjectAgain()
          Resets the TestObject method state so that the system searches again for the TestObject.
 java.lang.Object[] getArgs()
          Returns the arguments passed to the method.
 java.lang.String getMethod()
          Returns the method being called.
 java.lang.String getMethodSignature()
          Returns the signature of the method being called.
 ScriptCommandFlags getScriptCommandFlags()
          Returns the script command flags from the original script command.
 TestObject getTestObject()
          Returns the TestObject whose method is being invoked.
 java.lang.Throwable getThrowable()
          Returns the object that was thrown during a method invocation.
 java.lang.String getThrowableClassName()
          Returns the classname of the Throwable object that was thrown during a method invocation.
 java.lang.String getThrowableMessage()
          Returns the message from the object that was thrown during a method invocation.
 void setFoundTestObject(TestObject foundObject)
          Sets the TestObject to be used when invoking the method.
 void setReturnValue(java.lang.Object returnValue)
          Sets the return value.
 

Method Detail

getTestObject

TestObject getTestObject()
Returns the TestObject whose method is being invoked.

Since:
RFT1.0

getMethod

java.lang.String getMethod()
Returns the method being called.

Since:
RFT1.0

getMethodSignature

java.lang.String getMethodSignature()
Returns the signature of the method being called.

Since:
RFT1.0

getArgs

java.lang.Object[] getArgs()
Returns the arguments passed to the method. If there are no arguments, null is returned.

Since:
RFT1.0

getScriptCommandFlags

ScriptCommandFlags getScriptCommandFlags()
Returns the script command flags from the original script command. If the flags are not available, ScriptCommandFlags.NO_FLAGS is returned.

Since:
RFT1.0

setReturnValue

void setReturnValue(java.lang.Object returnValue)
Sets the return value. If this method is called after the IObjectManagerEventListener method returns, no further processing of the method occurs. The specified return value is returned to the caller of the method.

Since:
RFT1.0

setFoundTestObject

void setFoundTestObject(TestObject foundObject)
Sets the TestObject to be used when invoking the method. This TestObject must be a found object. In other words, it cannot be a TestObject constructed from a mapped object. Specifically, the test script helper methods return test objects that have not been found. Therefore, these values are not suitable for use directly.

However, you can call the TestObject.find method on the TestObject returned from a helper script and pass the found value into setFoundTestObject, which is typically called in a RationalTestScript onObjectNotFound or onAmbiguousRecognition method (see IObjectManagerEventListener). If this method is called after the IObjectManagerEventListener method returns, the method is invoked on the specified foundObject. This is typically called to pick a particular object in an onAmbiguousRecognition method.

Since:
RFT1.0

findObjectAgain

void findObjectAgain()
Resets the TestObject method state so that the system searches again for the TestObject. For example, if an object cannot be found because an application is not running, the onObjectNotFound method is called. The onObjectNotFound method can also start the application and then call findObjectAgain.

Since:
RFT1.0

getThrowableClassName

java.lang.String getThrowableClassName()
Returns the classname of the Throwable object that was thrown during a method invocation. It is only valid in a RationalTestScript onTestObjectMethodException method. Otherwise it is null.

Since:
RFT1.0

getThrowableMessage

java.lang.String getThrowableMessage()
Returns the message from the object that was thrown during a method invocation. It is only valid in a RationalTestScript onTestObjectMethodException method. Otherwise it is null.

Since:
RFT1.0

getThrowable

java.lang.Throwable getThrowable()
Returns the object that was thrown during a method invocation. It is only valid in a RationalTestScript onTestObjectMethodException method. Otherwise it is null.

Since:
RFT1.0