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 difference between Automation object model(AOM) and test object model(TOM)

2 Answers   UHG,


How many ways we can parameterize data in QTP?

2 Answers  


After running scripts how you report results ,there is any specific report form

1 Answers  


What do you mean by checkpoints in qtp?

0 Answers  


Hi, how can we check or avoid the memory leakage in QTP9.2?

0 Answers   Arctern,






Can we do Load Teting with QTP?

12 Answers  


I have 3 add buttons of same properties in my page but i want trigger one of them i required in my recovery scnario manager is qtp recognizes it to recovre d scnario if so how qtp recognizes it

3 Answers  


How to carry out bit map check points in QTP

0 Answers   kenexa,


Diff B/w Webserver and Client Server

2 Answers  


what is error and fault in terms of software quality?

0 Answers   TCS,


Plz Explain How to access Or Store Script from VSS? Explain Real time work (qtp) where you store folders and next to how to you access that folders and how you maintain folders in VSS ? What are the Menu's in VSS? Suppose in Manual, by using Checkin Checkout u can access documents. how you access in QTp REal time?

0 Answers   CTS,


In QTP, Which are the concepts are needed to do Functional testing and Regression testing?

3 Answers   IBM,


Categories