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 many types of Test Plans are there...??

5 Answers  


In real time ,How to run all scripts in QTP? i,e in projects

3 Answers  


Hi All. Can you please explaing what is checkpoint? How it Will Work? what is meaning of "check checkpoint ("proprtname").how it will compate with expected value? Thanks in Advance............... Lakshmi

3 Answers   ITC Infotech, TCS,


How to handle the errors without using recovery scenery?

3 Answers  


what is test scheduleling?

0 Answers   IBM,


In key word driven framework,we will rename the logical names of objects,why?

3 Answers   Liquid Hub,


What is expert view and keyword view?

0 Answers  


Hi, My problem is as follows. I recorded a script that created Object repository of each action i recorded. But later I added one more step (which was to enter data in a textfield) into the script through expert view. But as no repository for this newly added step exists in the test, my script fails. So please help me to sort this problem that how can I create object repository of a new step in an existing test. Thanks everyone

1 Answers  


What are the Mandatory Properties of WebTable Object and Link Object in Web testing using QTP

2 Answers   iLink,


What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?

0 Answers  


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

0 Answers   W3 Solutions,


Hi Guys...I just started working with QTP now.The frame work they use hear is Write all the functions in function libraries and pass data using data dictionary either from data table or excel .I kind of understood evrthing but one thing I need to know is How do they recognize objects .Do they use object spy and recognize objects or record them ..Does soemone have any idea how they generally do this is such kind of framework

0 Answers  


Categories