i'm using the qtp to test to vb appliction,i wanted to get
the new application's title.i didn't want to use the winAPI
to get it ,i 'd like to know whether a QTP function can do
it.
Eg:
SystemUtil.Run "C:\Program Files\.....","","","" 'run
an application, and misure the application is
activating,then how to get the hwn wihtout using windowns
api



i'm using the qtp to test to vb appliction,i wanted to get the new application's title.i..

Answer / Abhay Kumar Pandey

In QTP (QuickTest Professional), you can use the following script to get the application's title without using WinAPI. This example assumes that you have an instance of the application.nn```vbnetnDim appTitle As StringnSet Desktop = CreateObject(&quot;win32.Desktop&quot;)nFor Each WinObj In Desktop.OpenWindowsn If WinObj.Caption = &quot;<your_app_title>&quot;n Set MyApp = WinObjn appTitle = MyApp.Captionn Exit Forn End IfnNextnMsgBox &quot;Application Title: &quot; &amp; appTitle&quot;```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

hi, can u tell me the QTP TEsting process in present real time companies?(beware of this... now a days Recording is not using,, only DP) and don't tell note book answers like step 1 spep2....like this .......post answer with professional skills in simple english words) thank u

1 Answers  


explain qtp framework by taking an example?

3 Answers  


How to perform action on objects, If two objects have the almost the same name ? example : Object 1 : "Entry of Items" Object 2 : "Items" Whenever I ask QTP to perform an action on Object 2 it performs action on Object 1. Note: The two objects are present in an Oracle Application tree.

2 Answers   Wipro,


How to retrieve the data from database?

6 Answers   Wipro,


How to get Traceability matrix from TD?

1 Answers  


1.How recognize QTP Dyanamic Image? (suppose tha wedpage contains 3 logos..1 square 2.circle 3.rectangel)there changing at same position how to capture that)

3 Answers   Synechron,


How to retrieve the property of an object?

1 Answers  


can we call a test in another test? how? explain with one example?

1 Answers   iFocus,


why should we give deliver good quality software?

1 Answers  


Syntax for how to call one script from another? and Syntax to call one "Action" in another?

2 Answers  


I have recorded a test using qtp to download a file in an application. Code: Browser("MFA Work Queue Manager").Page("MFA Work Queue Manager").Link("Rules Maintenance").Click Browser("MFA Work Queue Manager").Page("Rule Maintenance").WebEdit("txtSearch").Set "PmtType" Browser("MFA Work Queue Manager").Page("Rule Maintenance").WebButton("Search").Click Browser("MFA Work Queue Manager").Page("Rule Maintenance").WebButton("Export").Click Browser("MFA Work Queue Manager").Dialog("File Download").WinButton("Save").Click Browser("MFA Work Queue Manager").Page("Rule Maintenance").Sync Dialog("Save As").WinButton("Save").Click Dialog("Save As_2").WinButton("Yes").Click Problem: When running this test it gives an error at line no. 5 as Save button object is not identified by it's parent object. This code I ran 4 times after recording at it was working fine but 5th time onwords, it starts giving me the above problem. I used exist property option, Check Property option but none of this changes work at all. Kindly help...

1 Answers   Bank Of America,


how can we retrieve ten rows from the data table using loop concept?

3 Answers  


Categories