com.mercury.ftjadin.infra
Class RecordMessage
java.lang.Object com.mercury.ftjadin.infra.RecordMessage
- extends java.lang.Object
public class RecordMessage
The RecordMessage class represents a single recorded line to be sent to UFT to be written as a new test step. Instances of this class are not created with NEW, but are returned by a call to getRecordMessageInstance.
Constructor Summary | |
---|---|
protected | RecordMessage() |
Method Summary | |
---|---|
RecordMessage | addParam(ConstantParam constant) Adds a ConstantParam argument to the test object
method call at the specified position. |
RecordMessage | addParam(int position) Adds an argument to the test object method call at the specified position. |
RecordMessage | addParam(java.lang.String s) Adds a string argument to the test object method call at the specified position. |
java.lang.String | getCommand() Gets the test object method to record. |
java.lang.Object | getParam(int position) Gets the argument at the specified position. |
java.util.Vector | getParams() Gets the arguments to the test object method call. |
int | getParamsCount() Gets the number of arguments to the test object method call. |
int | getQTMode() Gets the UFT send mode matching this record mode. |
static RecordMessage | getRecordMessageInstance() Outputs debug information. |
static RecordMessage | getRecordMessageInstance(java.lang.Object subject,
java.lang.String vbCommand,
java.lang.String[] params,
AgentRecordMode mode) Creates a message for recording. |
static RecordMessage | getRecordMessageInstance(java.lang.Object subject,
java.lang.String vbCommand,
java.lang.String[] params,
AgentRecordMode mode,
int time) Creates a message for delayed recording and sets the timeout. |
AgentRecordMode | getSendMode() Gets the recording mode. |
java.lang.Object | getSubject() Gets the object whose event is being recorded. |
ObjectCS | getSubjectCS() Gets the support class for the object whose event is being recorded. |
int | getTimeout() Gets the timeout for delayed recording. |
void | setCommand(java.lang.String command) Sets the test object method. |
void | setSendMode(AgentRecordMode mode) Sets the recording mode. |
void | setTimeout(int timeout) Sets the timeout for delayed recording. |
java.lang.String | toString() Returns a string representation of the object. |
Constructor Detail |
---|
RecordMessage
protected RecordMessage()
Method Detail |
---|
getRecordMessageInstance
public static RecordMessage getRecordMessageInstance()
- Outputs debug information. If debugging, outputs name of new message. If stack debug is active, outputs the stack trace.
- Returns:
- The new RecordMessage.
getRecordMessageInstance
public static RecordMessage getRecordMessageInstance(java.lang.Object subject, java.lang.String vbCommand, java.lang.String[] params, AgentRecordMode mode)
- Creates a message for recording.
- Parameters:
subject
- The object whose event is to be recorded.vbCommand
- The step command, generally a test object method.params
- ThevbCommand
method arguments.mode
- A constant defined in the AgentRecordMode class, for example, NORMAL_RECORD or TIMER_RECORD.
getRecordMessageInstance
public static RecordMessage getRecordMessageInstance(java.lang.Object subject, java.lang.String vbCommand, java.lang.String[] params, AgentRecordMode mode, int time)
- Creates a message for delayed recording and sets the timeout.
- Parameters:
subject
- The message subject.vbCommand
- The step command, generally a test object method.params
- ThevbCommand
method arguments.mode
- A constant defined in the AgentRecordMode class, for example, TIMER_RECORD.time
- The delay time before recording.
setCommand
public void setCommand(java.lang.String command)
- Sets the test object method.
- Parameters:
command
- The method, for example, Click.
getSubject
public java.lang.Object getSubject()
- Gets the object whose event is being recorded.
getSubjectCS
public ObjectCS getSubjectCS()
- Gets the support class for the object whose event is being recorded.
getCommand
public java.lang.String getCommand()
- Gets the test object method to record.
getParamsCount
public int getParamsCount()
- Gets the number of arguments to the test object method call.
getParam
public java.lang.Object getParam(int position)
- Gets the argument at the specified position. The position is 0-based.
getParams
public java.util.Vector getParams()
- Gets the arguments to the test object method call.
addParam
public RecordMessage addParam(int position)
- Adds an argument to the test object method call at the specified position.
addParam
public RecordMessage addParam(java.lang.String s)
- Adds a string argument to the test object method call at the specified position.
addParam
public RecordMessage addParam(ConstantParam constant)
- Adds a
ConstantParam
argument to the test object method call at the specified position.
toString
public java.lang.String toString()
- Returns a string representation of the object.
- Overrides:
toString
in classjava.lang.Object
setSendMode
public void setSendMode(AgentRecordMode mode)
- Sets the recording mode.
- Parameters:
mode
- A constant defined in the AgentRecordMode class, for example, NORMAL_RECORD or TIMER_RECORD.
setTimeout
public void setTimeout(int timeout)
- Sets the timeout for delayed recording.
getTimeout
public int getTimeout()
- Gets the timeout for delayed recording.
getSendMode
public AgentRecordMode getSendMode()
- Gets the recording mode.
- Returns:
- A value defined in the AgentRecordMode class, like NORMAL_RECORD or TIMER_RECORD.
getQTMode
public int getQTMode()
- Gets the UFT send mode matching this record mode.