How to find RAM size by using QTP?
Answers were Sorted based on User's Feedback
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 |
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 |
What are the trigger events in qtp?
How to test the login page in different ways in automation testing and i need code?
How to load the object repository at run time?
write a qtp script to see time in windows command prompt? its urgent....
What is the difference between systemUtil and invoke method..?
i need code for how to click on particular mail in utlook mail box .its urjent Thank You Balaji
What are the advantages of qtp?
Hi, i want download attached files in test plan area from QC to local drive in my system using QTP script. Please help me
What is diff between SDLC AND STLC?
Wt is the difference between Business Component and scripted component?
How to import excel sheet to QC?
Explain the concept of object repository & how QTP recognises objects?