Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is a file system object in QTP

Answers were Sorted based on User's Feedback



what is a file system object in QTP..

Answer / sreeprasad

File System is used to create file through scripting.We can

read, write and save data in txt file and use it after

wards during testing. Here is example of creating txt file

through FSO

Const ForReading = 1, ForWriting = 2

Dim fso, MyFile

Set fso = CreateObject("Scripting.FileSystemObject")

Set MyFile = fso.OpenTextFile("c:testfile.txt",

ForWriting, True)

MyFile.WriteLine "Hello world!"

MyFile.WriteLine "The quick brown fox"

MyFile.Close

Set MyFile = fso.OpenTextFile("c:testfile.txt",

ForReading)

ReadLineTextFile = MyFile.ReadLine ' Returns "Hello

world!"

It will create testfile.txt and enter "This is a test" in

that text file. You can later read that line "This is a

test" from this file while using

MyFile.ReadLine

We can save variables data during testing and then use that

data in future instances of testing and then delete that

file.

Is This Answer Correct ?    19 Yes 3 No

what is a file system object in QTP..

Answer / bala

In simple terms "Filesystemobject" is an object model which
is used to handle the drives, folders, and files of a
system or server.

If an user needs to work Driver, Folder, Files properties,
methods or events then the first step he need to setup is
filesystemobject.

Hope this helps. Let me know if you need an example.

Is This Answer Correct ?    14 Yes 1 No

what is a file system object in QTP..

Answer / manju

File system object is an interface between QTP and the
local system. using FSO we can create/delete folder,
create/delete/read from/write to text files

Is This Answer Correct ?    5 Yes 0 No

what is a file system object in QTP..

Answer / prashanthkumar

Hai Bala,

Just now i read ur defination on File system object.
well, it would be more specific ,if u could explain with an
example...
I appreciate,if u can do that now.
Thx.

Is This Answer Correct ?    2 Yes 1 No

what is a file system object in QTP..

Answer / 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

what is a file system object in QTP..

Answer / brahma

fso is a another methode for writing VB script in notepad. by using this F.S.O we can create folders and files in our machine.this is interface b/w layer1 and layer3 instead of obect repocitory.
simply we can define
layer1----obect repocitory---layer3(application like flight)
but
layer1---F.S.O--------layer3

Is This Answer Correct ?    1 Yes 1 No

what is a file system object in QTP..

Answer / mm sarwar

Set objFile = CreateObject("Scripting.FileSystemObject")
Set myFolder = ObjFile.CreateFolder ("C:Program FilesFSO")

If objFile.FolderExists ("C:Program FilesFSO")
MsgBox "Folder is Created"
End If

Set myFile = objFile.CreateTextFile ("C:Program FilesFSO ext_01.txt")

If objFile.FileExists ("C:Program FilesFSO ext_01.txt") Then
MsgBox "File Created"
End If

myFile.WriteLine "Hello World"
myFile.Write "We are practicing UFT."
myFile.Write "One day all of us get a Job"
myFile.Close

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

If you entered into yahoo mail with your valid user name and password , then you will get " welcome , username " (for example you will see , “welcome, Krishna” ) text on the top of the Inbox page , how can you test the user name is correct or not using QTP?

3 Answers   CTS,


What is Test Fusion Report in QTP?

0 Answers  


what is the difference betn QTP 8.0 AND PREVIOUS VERSION

0 Answers   BirlaSoft,


What is QTP’s model for test creation?

0 Answers  


Dear All , For UFT 12.02 which version QC or ALM will support ? Thanks Balaji

0 Answers  


How can we QTP Scripts in xml format? is there any way to do so?

2 Answers   Apex,


what is the difference between link and hyper link?

1 Answers   Ordain Solutions,


plz can any one send me what is Automation Testing Frameworks.. Thanks in advance

1 Answers  


give me the code for check point for validating application

1 Answers  


what r advance features u had done in QTP?

3 Answers   HCL,


how to record a word doc using qtp i.e open a word doc,type something and save the doc can someone send me the code.

3 Answers  


I am a beginner plz tell me,how do we write scripts in QTP? In my opinion we can write scipts in expert view or there is another option where we can write scripts. plz tell me.

5 Answers  


Categories