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

Howcan you differentiate between Exist statement, Exist property, and Exist method??? How they used???

2 Answers   IBM,


For Data-Driven testing can you use micro soft word document instead of using Datatable what is your approach?

0 Answers   Nokia,


what is the criteria for choosing test cases for automation? Ex: if you have some 300 test cases, then how many you choose for automation. what is criteria of selecting?

3 Answers   Aricent, Delhi University, TCS,


If I change the property value at runtime is it effect is object repository?

0 Answers  


In ordinal identifier there r 3 options available. Which one will be enabled first when ordinal identifier is invoked.

3 Answers   Cap Gemini,






How to handle the exceptions using the recovery scenario manager in qtp?

0 Answers  


How to parameterize a text field and the same field as combo field on next page. Means inserting values in Text field will appear in the combo field. for example country name, state name. Kindly reply it is urgent !!!

1 Answers   Adobe,


Is the provision for integrating QTP with QC ,available from the version 9.0 onwards only or even 8.2 version has such provisions?

1 Answers  


What is meant by Repository?

7 Answers   ALFiNE IT Solutions, Four soft,


Why QTP is termed as a Record and Playback tool?

1 Answers  


While creating Recovery Scenario for Pop-up window..In 'Recovery operation' we have to call a function. Can u tell me that function.

4 Answers   Alcatel-Lucent, Ordain Solutions,


Hi all please solve this.It is urgent..... When I right clicked on a Web image manually It displayed Open link,open link in new window,save picture as, Email picture,Printpicture,propeties...etc. While automation I have written a code like this 'browser("Google").Page("ramseeker®: Memory and_3").Image ("graphOfModel").Click 10,10,micRightBtn But the right click menu was not displayed. I want to save that image in a seperate folder

6 Answers  


Categories