How do you done Data-Driven Testing using MS-Word. What is
the script for that

Answers were Sorted based on User's Feedback



How do you done Data-Driven Testing using MS-Word. What is the script for that..

Answer / rajani

option explicit
dim fso,f,n
set fso=createobject("Scripting.filesystemobject")
set f=fso.opentextfile("path of the word document",1,false)

while(f.atendoflen<>true)'reading the word doc.
n=f.readline 'retrive the data from doc.line by line
wend.

Is This Answer Correct ?    3 Yes 2 No

How do you done Data-Driven Testing using MS-Word. What is the script for that..

Answer / prashanth chenna

Hai friends,
What is the script above is absolutly correct. in script,
in 4th line 1--> Read mode of file
2--> Write mode of file
8--> Append mode of file
True--> New file creation when specified file doesnot exist
False--> QTP is not responsible when specified file doesnot
exist
in 6th line
f.atendofline--> the end of file content

this script not only for MS.Word also for Notepad ie for
Flat files.

Is This Answer Correct ?    1 Yes 1 No

How do you done Data-Driven Testing using MS-Word. What is the script for that..

Answer / sunitha

Hi,

I tried the steps given above, but it displays only in
terms of ASCII. could you please give me the correction.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

how can i sent QTP results to the Html, notefile ,xl file give me the code using g mail login page

0 Answers  


Is it possible to call from one action to another action in qtp?

0 Answers  


In Test Directory, What are the contents in test case designing? if you prepare in excel sheet how u use thrw Test Directory?

0 Answers  


Hi All, I am new to QTP but i was trained on winrunner before. My problem is..QTP 8.2 was unable to record my application which is a java app. By selecting smart identification, i was somehow able to record the test BUT QTP cant run the test! Can anyone help me in walking through this problem..Is java addin really necessary for this?? Is there anyways i can run the test successfully? I am not sure whats going wrong in my testing.Please do help me asap as i need to submit the report early. Thanks in advance

4 Answers  


1. how can you handle exceptions without using recovery scenario?

5 Answers   TCS,






what is the script(qtp) to export and import the datas from MSaccess to Excel sheet.if anybody know plz tell me.

3 Answers  


How to differentiate the webedit field like user name and password? Please tell any other best answer is ther

3 Answers   Navis,


actually how many hours per one day we will work on automation (qtp) in real time

1 Answers   Synechron,


How to retrieve value (data) from notepad using QTP ?

5 Answers   Health Care,


Hi anyone having QTP 10.0 licence or crack version pls send me in this mail id mdilipkumar04@gmail.com Regards Dilip

1 Answers  


vb script for calling one function to the another function

2 Answers  


what is keyword driven testing

2 Answers  


Categories