How do u insert an object during runtime in qtp?

Answers were Sorted based on User's Feedback



How do u insert an object during runtime in qtp?..

Answer / ravi

Where do you want to insert object ??

We can create object at runtime using createobject()
function in VBScript.

For ex:
Set con = createobject("ADODB.Connection")

The above statement creates connection object at runtime.

Is This Answer Correct ?    3 Yes 1 No

How do u insert an object during runtime in qtp?..

Answer / 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

More QTP Interview Questions

3 differences between QTP & Winrunner?

1 Answers  


What is the difference between Systemutil.run and Navigate.

6 Answers   Synechron,


In a web page, one web table is present which is dynamic. In that table one of the column has links with the same inner text. write a script so that i need to click the third link.

3 Answers  


what is descriptive programming? what are the mandotory properties in qtp? what are libriry functions in qtp? what frame work you are using at your project? what is object repositery? what is our role as per qtp project is concerned as a software tester?

3 Answers   Wipro,


need clear explanation of actions and functions in qtp with examples?can anyone suggest me gud site for that other than qtp manual?

2 Answers  


What are benefits of qtp?

0 Answers  


Hi All, How to Compare two strings character by character in QTP

0 Answers  


Which HTML specification will be adhered to? How strictly? What variations will be allowed for targeted browsers?

0 Answers  


give one example where you have used regular expression?

6 Answers   Ordain Solutions,


can we take 'dim my pen is good' as a paramerter

2 Answers  


How do you do batch testing in wr & is it possible to do in qtp, if so explain?

0 Answers  


how to create flat file datasubmission in qtp

0 Answers  


Categories