write a qtp script to enter user name & password for flight
reservation login page from excel sheet



write a qtp script to enter user name & password for flight reservation login page from excel ..

Answer / mudaseer

Set xl=createobject("excel.application")
Set wb=xl.workbooks.open("C:\hello.xls")
Set ws=wb.worksheets(1)
un=ws.cells(1,1)
pwd=ws.cells(1,2)
wb.close
xl.quit
systemutil.Run "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe"


With dialog("login")
.WinEdit("Agent Name:").Set un
.Winedit("Password:").Set pwd
.WinButton("OK").Click
End With

Is This Answer Correct ?    5 Yes 2 No

Post New Answer

More QTP Interview Questions

HOW AND WHY TO CREATE EMPTY OBJECT IN QTP?

2 Answers   Patni,


how do u handle an object without name using QTP 9.2?

0 Answers   CTS,


Hello Everyone, Please provide me the practical example of business component concept of QTP.Like how to create business component,how to connect the quality center etc.... Thanks in advance, Gaytri

0 Answers  


how many scripts r there in QTP? pls any answer this question?

4 Answers  


I have a drop down box to show selected number of records in result page.It contains 4 items like 10, 25,50 and 100. when i was recordes script for seelcting each item and checking selecting number of records in the result page( it is in the same page in the table format)it is generating a new page with same controls( objects) in the OR. how to avaid these in OR? is it possible to write DP for only these lines?, remaining(remaingin lines of code) objects i want use from OR only. One more problemis if change ( add /remove properties of an OBJECT in OR , my ( recorded )application is not running.

5 Answers   Virtusa,






This is a question thats generally asked in every QTP interview. What were the problems that you faced during automation and how did you resolve them?

0 Answers  


I have java based application on my computer. Can I install QTP on it? What are system requirements for installing QTP?

3 Answers  


how to record a word doc using qtp i.e open a word doc,type something and save the doc can someone send me the code.

3 Answers  


What is the parameterization?

0 Answers  


What’s the basic concept of QTP?

1 Answers  


What is Object Spy in QTP?

11 Answers   vsworx,


w is descriptive programming

2 Answers   TCS,


Categories