public interface ITestObjectMethodState
TestObject
.IObjectManagerEventListener
Modifier and Type | Method and Description |
---|---|
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.
|
TestObject getTestObject()
TestObject
whose method is being invoked.java.lang.String getMethod()
java.lang.String getMethodSignature()
java.lang.Object[] getArgs()
null
is returned.ScriptCommandFlags getScriptCommandFlags()
ScriptCommandFlags.NO_FLAGS
is returned.void setReturnValue(java.lang.Object returnValue)
IObjectManagerEventListener
method returns, no further processing of the method occurs.
The specified return value is returned to the caller
of the method.void setFoundTestObject(TestObject foundObject)
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.
void findObjectAgain()
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
.java.lang.String getThrowableClassName()
Throwable
object that was thrown during a method invocation. It is only valid in a RationalTestScript
onTestObjectMethodException
method. Otherwise it is null
.java.lang.String getThrowableMessage()
RationalTestScript
onTestObjectMethodException
method. Otherwise it is null
.java.lang.Throwable getThrowable()
RationalTestScript
onTestObjectMethodException
method. Otherwise it is null
.