The above script creates a notepad in "d" drive with name file1
values are stored in file1.txt.
The above script is used for data driven using notepad directly.here we are not importing data to excel sheet.
directly values are retreived from notepad.
we are using while loop and reading each line till the end.
split function splits the line where space(" ")occurs.
line is divided to 2 parts.one before space and other after space
for example we have 1st line in notepad as aaa bbb
here aaa is 1st part and bbb is 2nd part
all values are read this way using while loop.
One point to note here is if any line is empty in notepad datadriven testing is stopped before that line.
It will not proceed further.so we have to give values without any empty lines in notepad.
to make u more clear
suppose u have
datadriven is stopped at Raju and Rani only because next line is empty.datadriven is stopped after 1st line.
Could you please anybody otherthan this method only on Notepad
February 15, 2009 10:42 AM
September 29, 2010 6:55 PM