what is a file system object in QTP

Answer Posted / smitha

correct code

const ForReading = 1, ForWriting = 2

Dim fso, MyFile

Set fso = CreateObject("Scripting.FileSystemObject")

Set MyFile = fso.OpenTextFile("D:\New
Folder\somefile.txt",ForWriting, True)

MyFile.WriteLine "Hello world!"

MyFile.WriteLine "The quick brown fox"

MyFile.Close

Set MyFile = fso.OpenTextFile("D:\New
Folder\somefile.txt",ForReading)

ReadLineTextFile = MyFile.ReadLine ' Returns "Hello world!"

MyFile.ReadLine

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When using descriptive programming?

729


Have you faced any problems with object repository?

684


Hi Friends, Would be great if you can provide the Model Question paper, Web site link or any reference s. Thanks & Regards, Byzoor,

1437


give me the code to save all messages of inbox of gmail into a folder and notepad

1715


hi, can u tell me the QTP TEsting process in present real time companies?(beware of this... now a days Recording is not using,, only DP) and don't tell note book answers like step 1 spep2....like this .......post answer with professional skills in simple english words) thank u

1423






QTP 10.0 is not identifying web objects for IE 8.it is identifying like winObject.I installed HP patch QTPWEB_00037.Still getting issue

5673


When Recovery scenario actually starts while testing the application?

1649


I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format. Hence, if possible, kinldy mail PDF file to my mail-ID: sushmapokhriyal79@gmail.com

1595


Hi Every body please explain me in steps to use checkpoints and object Repositories in QTP for Flight Reservation application please tell me the steps for this its urgent pls thanx for urs answers

1667


What environment does qtp run in?

701


Hi, I am using OutputCheckPoint and I am storing the value in the data table. The stored value for column:bedroom:"Bed:4" The another value for column:bathroom:"Bath:2 Full,1 Partial" I need only the no 4 from the first column. I need only the no 2,1 from the second column. I used split array,but it also show array(0) has the value"bed:4" ..... Even though I highlight only 4,It is seleting the full value "bed 4".How can I get only the nos Thank you Uma

1377


Explain the concept of object repository and how qtp recognises objects?

617


what is the frame work in J-meter?

1701


How can we extract data like "Details","Result","Time" from the 'Run Error' result generated in QTP after run time errors are generated during a run & import the details etc...into excel sheet

1632


we add library file used in test via settings or through "ExecuteFile" command. when we implement framework do we make common library file and load the same for all the test cases execution?

1748