Back To Normal

Subscribe To Our E-Mail Newsletter

Wednesday, March 3, 2010

How to read and Write data from Text File using Silk Test?


Couch ModePrint It

Silk Test is providing Default functions to read and write data into text Files.
For Reading data from Text File:
ListRead (lsList, sFileName, frType)
Note : Each item in the list can be a maximum of 512 characters.-
For Writing data into Text File:
ListWrite (lsList, sFileName, ftType)


But if you want to update the data into Text file. user has to write new functions for that.
Function writedataintotextFile(sFileFullPath,lsTest)
{
 HFILE hNoteFile
 Int iCount
 List of STRING lsTest

 hNoteFile =FileOpen(sFileFullPath,2) // 2 For Write , 3:Update 1: Read
 for iCount =1 to ListCount(lsTest)
   FileWriteLine (hNoteFile,lsTest[iCount])
 FileClose (hNoteFile)
}

Click Here For Smileys :D
:D
:)
:[
;)
:D
:O
(6)
(A)
:'(
:|
:o)
8)
(K)
(M)

No comments:

560 Free Online Courses

Top 200 universities launched 500 free online courses.  Please find the list here .