Mercury.QTP.CustomServer Namespace : CustomServerBase Class |
Your custom server extends CustomServerBase
and implements your replay interface.
public class MyAppSrv: CustomServerBase, IMyAppSrvReplay
CustomServerBase
exports utility methods. These utility methods are divided into the General and Remote access categories.
General utilities include recording a method in UFT, accessing the settings, and writing to the test results.
Remote access services are accessible only to custom servers running in the UFT context. They are used to access properties and methods on the .NET control and create remote objects that run in the AUT context.
A custom server must implement the following methods in the derived class:
- InitEventListener
- ReleaseEventListener
System.Object
System.MarshalByRefObject
Mercury.QTP.CustomServer.CustomServerBase
Name | Description | |
---|---|---|
SourceControl | Returns the source control object. | |
WndHandle | Returns the Control's window handle. |
Name | Description | |
---|---|---|
RemoteAccess | Exposes the unsafe remote interface definitions. |
Name | Description | |
---|---|---|
Disconnect | This method supports the UFT infrastructure. Do not override and do not call directly in your code. | |
DragAndDrop | Simulates Mouse Drag and Drop operation. | |
GetSettingsValue | Returns the Parameter value from the Settings sub-element of this control in the SwfConfig.xml configuration file. | |
GetSettingsXML | Returns the Settings sub-element of this control in the SwfConfig.xml configuration file. | |
GetWndMessageFilter | See IRecord.GetWndMessageFilter | |
Init | This method supports the UFT infrastructure. Do not override and do not call in your code. | |
InitEventListener | This method is called once to start listening for events. See IRecord.InitEventListener | |
InitializeLifetimeService | Overridden. Prevents your Custom Server from timing out. Do not change or override this implementation. | |
KeyDown | Simulates Key Down operation. | |
KeyUp | Simulates Key Up operation. | |
MouseClick | Simulates Mouse Click operation. | |
MouseDblClick | Simulates Mouse Double Click operation. The method gets Control clients coordinates. | |
MouseDown | Simulates Mouse Down operation. | |
MouseMove | Simulates Mouse Move operation. | |
MouseUp | Simulates Mouse Up operation. | |
OnMessage | See IRecord.OnMessage | |
PrepareForReplay | Overloaded. Prepares the Control for a replay action. | |
PressKey | Simulates Press Key operation. | |
PressNKeys | Simulates pressing a key the specified number of times. | |
RecordFunction | Writes a test object method call to the test script. | |
ReleaseEventListener | This method is called at the end of the recording session to stop listening for events. See IRecord.ReleaseEventListener | |
ReplayReportStep | Writes an event to the test report. | |
ReplayThrowError | Overloaded. Throws an exception based on the specified error and sets the step status to EventStatus.EVENTSTATUS_FAIL. | |
SendKeys | Sends a string to the control in a new thread. |
Name | Description | |
---|---|---|
AddHandler | Overloaded. Adds an Event handler in the AUT context. If other handlers exist for the event, the handler added with AddHandler is called first. | |
AddRemoteEventListener | Creates an EventListener instance in the AUT context. | |
ControlGetProperty | Returns a property of a control that is not thread-safe. | |
ControlInvokeMethod | Invokes a method of a control that is not thread-safe. | |
ControlSetProperty | Sets a property of a control that is not thread-safe. | |
CreateRemoteObject | Creates an Assistant instance of the specified type in the AUT context. | |
Finalize | Distructor. | |
GetTypeNameFromHandle | Returns the type name of the control in the window. | |
InvokeAssistant | Invokes a method of a CustomAssistantBase class in the control's thread. | |
SendString | Deprecated. Use SendKeys | |
ShowError | Displays the .NET warning icon. | |
TestObjectInvokeMethod | Invokes a method that is exposed by the test object's IDispatch interface. |