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

Hi, I have weblist which contains the data like Design change,admin edit and cost saving etc.. User doesn't know the values existed in weblist. Now the user has to select the right value from the list otherwise the test will fail. Pls help me "To select the correct value from the list"

1 Answers  


The structure of keyword driven frame work is like a folder structure the different sub folder are 1-functional libray folder 2-object repository folder 3- database folder 4-appliction1.xls 5-initalzation vbs file 6-sequence file 7-driver script 8-test case list file My question is whether these are in a local server machine or in our pc.((whether It like Vss). can u give example of driver script(code)

0 Answers   TCS,


explian qtp frame work and what is the use of it? what is the neceecity of this? explian detail?

2 Answers  


An object is non standard object, i mapped it to standard object, eventhogh on mapping to standard object i cannot use the methods available on the standard object with the mapped object. How i can use those standard object methods with these mapped object. (((Note : dont tell that we can use virtual object as virtual object is to map nonstandard obj to standard obj)))

0 Answers   HCL,


Can anybody help me by sharing the code for checkbox in qtp using vbscript.

2 Answers  






Does QTP support flat files? If yes what are those?

2 Answers  


what is reusable action and how the same can be implemented (process)?

2 Answers  


how can we test the Triggers, Cursors, Indexes while doing Database testing in DTP??

0 Answers   ABC,


how will you check how many members visited the website www.infosys.com?

0 Answers   Logica CMG,


What is the difference between Dim And Redim

4 Answers   Hotel Jobs, IBM, Microsoft,


Is there anyway to have QTP go into a website and map out every object before I actually record any tests? I basically want to map out a website with all the objects and build a complete repository. The reason is because I'm running into issues with hierarcical objects. for example: Browser("ABC company- Home").Page("ABC company - Home").Link ("About Us").Click Browser("ABC company - Page 2").Page("ABC company - Page 2").Link("About Us").Click Both these links ("objects" and I use that term loosely as I'm trained mostly in OO programming) go to the same place but but the object heirarchies (pages) are different. I want a repository that will find any possible link on any possible page without having to manually record it. Is there a way to do this?

1 Answers  


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

1 Answers  


Categories