How to find RAM size by using QTP?

Answers were Sorted based on User's Feedback



How to find RAM size by using QTP?..

Answer / kishorem89

Dim Wshshell,fso,fo,l
''Open the CMD Prompt
set WshShell = CreateObject("WScript.Shell")
SystemUtil.run "cmd.exe"
wait(2)
'cmd="systeminfo |find"
'cmd1="Total Physical Memory:"
'WshShell.SendKeys cmd &" "&"""" &cmd1&""""
WshShell.SendKeys "systeminfo |find"&" "&""""&"Total
Physical Memory:"&""""&">D:\Sys.txt"
WshShell.SendKeys "~"
wait(3)

WshShell.SendKeys "exit"
WshShell.SendKeys "~"


Set
fso=createobject("scripting.filesystemobject")
Set
fo=fso.opentextfile("D:\Sys.txt")
While
fo.AtEndOfStream<>true

l=fo.readline
MsgBox l
wend
fo.close
set fo=nothing
set fso=nothing

Is This Answer Correct ?    8 Yes 0 No

How to find RAM size by using QTP?..

Answer / uday

You can use SystemMonitor utility object.
You can find the info at below link.
http://hpsqtp.blogspot.com/2012/02/how-to-find-memory-usage-and-processor.html

Another way is using Windows WMI Service.
You can find details at below link.
http://hpsqtp.blogspot.com/2012/11/how-to-find-cpu-and-memory-usage-using.html

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More QTP Interview Questions

What is the logic for reading(exporting)the data from flat files to QTP?Can anyone explain me with an example? I appreciate it!!! Thanks!!! Prasanna

1 Answers  


what is the main process in QTP?

3 Answers   Ordain Solutions,


How to launch application under test through VBscript without using systemutil.run or invokeapplication?

3 Answers  


What is test object model in QTP?

1 Answers   Crea,


what is run-time object property in Object spy in QTP9?

3 Answers  


How is the Bitmap checkpoint different from Image checkpoint?

0 Answers  


HOW TO DO THE BATCH TESTING USING QTP?

2 Answers   Ordain Solutions,


What are the recording modes and executing modes avialble in QTP?

3 Answers   Polaris,


tell me about regular expressions in QTP? where we use? give eample?

2 Answers   IBM,


Is it possible to call from one action to another action in qtp?

0 Answers  


the presentation layer of my application is built using VB 6.0 and a series of C++ dlls and components. We do not use Java, VB.Net, C## or any other component that can be decompiled. We are automating the application using HP Quick Test Professional. It is not reconginizing the combo boxes, tabs etc.... Could you please suggest, whether QTP supports C++ dlls and components or not...if yes, could you please guide me, how to overcome this situation. Can we install any special add-ins for this C++? .When we are performing the recording/execution, the application becomes very slow. Your quick response will be highly solicited in this regard.

1 Answers   Wipro,


HI Everybody, I am using QTP 9.2, I have a problem and hope everybody help me solve it. Now I need to use mouse wheel event to zoom in or zoom out in web client, but QTP can't catch this event. I look forward helping of everybody. Thank you very much.

0 Answers  


Categories