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

How you create new action in qtp?

0 Answers  


how to validate email?email ie correct or not ?with below conditions. 1)before @(symbol) only alphbates and min 4 char to max 15 chars. 2)before @(symbol) only alphabates dont use ant special chars or numarics 3) after @(symbol) only one dot(.)symbol for ex:abc@gmail.com it is valid email or not based above conditons

2 Answers   Aspire,


what we do after completion of functional and regression testing

2 Answers  


Tell me one scenario, the complex functionality you have automated in your project?

0 Answers  


In order to select an automation tool for automating ur application, what r the things u need to consider? For eg i will go for automation; 1) When there is a lot of retesting and regression testing. 2) Return on investments. 3) Whether the tool supports the appln. 4)--------------, etc. Pls give me more number of points because my answer did not satisfy the interviewer. Very urgent pls

0 Answers  






if anyone has idea of the interview procedure in covansys, plz send me a mail?

0 Answers  


We are calling Actions in Expert View by using Run Action.but i want to know where we are saving the Actions Scripts.Pls explain??

1 Answers  


If the web applicatoin takes navigation time above 2 hours to dispaly next Web page then how can we synchronize the QTP with Appilication Under Test

4 Answers   TCS,


wt is automation framework? give explonation?

1 Answers   Mindlance,


How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s.

0 Answers  


What are the recording modes in wave event?

0 Answers  


Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this

0 Answers   Livetek,


Categories