How do u insert an object during runtime in qtp?

Answer Posted / baji prasad ch

By Using the Flat files Parameterization we can insert
objects during runtime.

[Parameterization is the process of supplying multiple test
data. That means sometimes we are executing our test
scripts with multiple test data We can parameterize our
Test Scripts in different ways.]

VB script to retrieve values from flat files during runtime:

Set A=createobject("Scripting.filesystemobject")
Set B=A.opentextfile("C:\Documents and
Settings\baji.prasad\Desktop\baji.txt", "1",true)
While B.atendofline<>true
X=B.readline


Dialog("Gracenote® MusicID (CD)").Activate

Dialog("Gracenote® MusicID (CD)").Activate
Dialog("Gracenote® MusicID (CD)").WinEdit("TOC").Set X
Dialog("Gracenote® MusicID (CD)").WinButton("Lookup
TOC").Click
Dialog("Gracenote® MusicID (CD)").WinButton("Rip CD Tracks
and Add").Click
Wend

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Dear Friends, I having total 3+year experience in manual testing including automation testing QTP, if i am attending any interview what kind of question will i get? please help me out

1802


In the website, the protocol has been changed http: to https what you will do? Tell me your approach?

806


Brief the process of testing with UFT?

824


How would you directly trigger javascript in a test?

1690


How will you compare keyword and expert view?

746


what is the difference between rational rose and QTP? WHICH TOOL IS BETTER TO LEARN? PLEASE SEND ME AT sana_50218@yahoo.com sandeep@epuratech.com

2561


On the website, the protocol has been changed https: to https what you will do? Tell me your approach?

800


In the application that I'm testing is having a WYSIWIYG editor.QTP is recording editor's body as web element. I want to add some data to this web Element at run time. The problem is that I cant find a method to add contents to this web Element. Can any one come up with an answer for this. Thankx.

1714


how can we preform retesting(DATA driven test) using function please gine the code for loginpage

2529


tell me abt a time when u had to go above &beyind the call of duty to get the job done

1684


Why do you create a text checkpoint on a Web application? What is the purpose of the Close method?

1603


Explain quicktest professional testing process?

748


What is test object model in quicktest professional (qtp)?

773


what is run-time data?

1946


What is 'sleep' in sync point?

850