Description
Use the Name
property to obtain the name of the object event that the given aqObjEventObj
object provides information about.
Declaration
aqObjEventObj.Name
Read-Only Property | String |
aqObjEventObj | An expression, variable or parameter that specifies a reference to an aqObjEvent object |
Applies To
The property is applied to the following object:
Property Value
A string that holds the event name.
Example
The code below obtains the events collection that belongs to the specified object and posts the names of the events to the test log.
JavaScript, JScript
function GettingEvents()
{
var Obj = Sys.Process("MyApplication");
// Obtains the events collection
var EventsCol = aqObject.GetEvents(Obj);
Log.Message("The events are:");
// Posts the events names to the test log
while ( EventsCol.HasNext() )
Log.Message(EventsCol.Next().Name);
}
Python
def GettingEvents():
Obj = Sys.Process("MyApplication")
# Obtains the events collection
EventsCol = aqObject.GetEvents(Obj)
Log.Message("The events are:")
# Posts the events names to the test log
while EventsCol.HasNext():
Log.Message(EventsCol.Next().Name)
VBScript
Sub GettingEvents
Set Obj = Sys.Process("MyApplication")
' Obtains the events collection
Set EventsCol = aqObject.GetEvents(Obj)
Log.Message "The events are:"
' Posts the events names to the test log
While EventsCol.HasNext
Log.Message EventsCol.Next.Name
WEnd
End Sub
DelphiScript
function GettingEvents;
var Obj, EventsCol;
begin
Obj := Sys.Process('MyApplication');
// Obtains the events collection
EventsCol := aqObject.GetEvents(Obj);
Log.Message('The events are:');
// Posts the events names to the test log
while ( EventsCol.HasNext() ) do
Log.Message(EventsCol.Next().Name);
end;
C++Script, C#Script
function GettingEvents()
{
var Obj = Sys["Process"]("MyApplication");
// Obtains the events collection
var EventsCol = aqObject["GetEvents"](Obj);
Log["Message"]("The events are:");
// Posts the events names to the test log
while ( EventsCol["HasNext"]() )
Log["Message"](EventsCol["Next"]()["Name"]);
}