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

Where is the resultset of a sqlquery (which is fired by rsobj.open sqlquery,xxxx,xxxx) stored ?

0 Answers   Accenture,


For Regression testing already written test cases are sufficient?

2 Answers   CTS,


Tell some commonly used Excel VBA functions?

0 Answers  


What is iteration?

1 Answers  


CAN SOME ONE TELL ME ABOUT QTP FRAMEWORK? I AM SUPPOSED TO GIVE THE QTP FRAMEWORK THIS WEEK SO PLEASE HELP

2 Answers  






where we are going to write the descriptive programming.for example we are invoking qtp application where we are going to write that code

3 Answers  


What is the difference between run time object and test object in QTP?

0 Answers  


Explain hybrid framework with advantages and disadvantages?

0 Answers  


What are the different attribute used with regular expression?

0 Answers  


HI. Plz Clarifie my doubt,having 2+yrs experience in Testing , But My accedamics(Xth,INTER) are Less than 60%, But B.Tech 72%. It creats any problem , When i change to any MNC. plz tell me......... lot of friends told it's a problem, Some people says NO problem, What .............

3 Answers  


How to carry out bit map check points in QTP

0 Answers   kenexa,


How you can find the absolute value of the number in qtp?

0 Answers  


Categories