SystemMonitor Object
Description
Enables you to retrieve information about a system counter during a test run.
Methods
  GetValue | Checks that an object exists. | 
  IsCounterExist | Indicates whether the specified system counter has been defined for the application. | 
GetValue Method
Description
Returns the current value of the specified system counter.
Syntax
SystemMonitor.GetValue("ApplicationName","CounterName")
Argument  | Type  | Description  | 
|---|---|---|
ApplicationName  | String  | The name of the application process (without the file extension) whose counter value you want to retrieve.  | 
CounterName  | String  | The name of the counter whose value you want to retrieve. Available counters are those accessible through the Performance Console (Select Start > Run and then enter   | 
The following example checks whether a GDI leak occurs during a test of the Windows Calculator application.
GDICount = 0  
If(SystemMonitor.IsCounterExist("calc","GDI Objects")) Then  
    GDICount = SystemMonitor.GetValue("calc","GDI Objects")  
End If  
' Perform operations on the calculator application that should result in the same amount of memory consumption.  
Window("Calculator").WinButton("8").Click  
Window("Calculator").WinMenu("Menu").Select "View;Scientific"  
'Check for GDI leak  
If(SystemMonitor.IsCounterExist("calc","GDI Objects")) Then  
    If(GDICount < SystemMonitor.GetValue("calc","GDI Objects")) Then  
        MsgBox "Found GDI Leak"  
    End If  
End If 
IsCounterExist Method
Description
Indicates whether the specified system counter has been defined for the application.
Syntax
SystemMonitor.IsCounterExist("ApplicationName","CounterName")
Argument  | Type  | Description  | 
|---|---|---|
ApplicationName  | String  | The name of the application process (without the file extension) whose counter you want to check.  | 
CounterName  | String  | The name of the counter you want to check. Available counters are those accessible through the Performance Console (Select Start > Run and then enter   | 
The following example checks whether a GDI leak occurs during a test of the Windows Calculator application.
GDICount = 0  
If(SystemMonitor.IsCounterExist("calc","GDI Objects")) Then  
    GDICount = SystemMonitor.GetValue("calc","GDI Objects")  
End If  
' Perform operations on the calculator application that should result in the same amount of memory consumption.  
Window("Calculator").WinButton("8").Click  
Window("Calculator").WinMenu("Menu").Select "View;Scientific"  
'Check for GDI leak  
If(SystemMonitor.IsCounterExist("calc","GDI Objects")) Then  
    If(GDICount < SystemMonitor.GetValue("calc","GDI Objects")) Then  
        MsgBox "Found GDI Leak"  
    End If  
End If  
 See also: 
- Crypt Object
 - DataTable Object
 - Description Object
 - DeviceReplay Object
 - DotNetFactory Object
 - DTParameter Object
 - DT Sheet Object
 - Environment Object
 - Extern Object
 - Parameter Object
 - JSON Object
 - JsonUtil Object
 - MercuryTimers Object (Collection)
 - MercuryTimer Object
 - NV Object
 - OptionalStep Object
 - ParallelUtil Object
 - LocalParameter Object
 - PasswordUtil Object
 - PathFinder Object
 - PDFUtil Object
 - Properties Object (Collection)
 - QCUtil Object
 - RandomNumber Object
 - Recovery Object
 - Remote Connection Object
 - Reporter Object
 - RepositoriesCollection Object
 - Repository Object
 - Services Object
 - Setting Object
 - SystemMonitor Object
 - TestArgs Object
 - TextUtil Object
 - UIAutomation Object
 - VisualRelation Object
 - VisualRelations Object
 - VisualRelationsCollection Object
 - WebUtil Object
 - XMLUtil Object
 

                                                        
                                                        
                                                        
                                                        
                                                        
 
 
                                                            
                                                            
                                        
                                        