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

I heard that in Hyderabad Ameerpet is renowned for its training institutes it has , but from my own experience I can only say that this institutes have become money making machines losing their cognitive ability and ethics , can anybody tell me is there a good ins. in hyderabad for testing tools.?

2 Answers  


how to identify the user defind varibles? plz tell me

1 Answers  


Error handling

3 Answers   Wipro,


What is the difference between keyword view and expert view?

0 Answers  


Hi, Can we open a test in qtp10 which is saved in qtp 9.2?

0 Answers  


When I click on a link in web page.Link should open in new window.can anyone please let me know the script for this ---Koti

0 Answers   HCL,


I am a new tester that needs to create an automatic script involving security questions. On a webpage I need to select a security question(which are random) from a drop down menu, and then input the answer as the last word from the security question. I have the script set-up to automatically select the first security question from the drop down. The problem I am having is trying to insert the security answer. How do I insert the security answer based on the selection from the security question?

0 Answers  


we r conduction testing on a project USING QTP, regarding that project the object repository is full ? Till that project having objects that r not recognised by repository, then what wil you do? How we wil recogine remailning objects? Is it possible to maintain another shared(or)peraction repository? what is the maximum capcity of object repository? How the technical people decide this much object repository is enoughf for this project?

7 Answers   AppLabs, CGI,


Can anybody send me the code to get the RO property of the active screen in QTP while running?

9 Answers  


What type of VB script u had done in expert view?

1 Answers  


What is the D/B Test managemet tool and bug trcking tool? Ans send to pbr.qtp@gmail.com

1 Answers   Cap Gemini,


What are different versions in Win Runner ,QTP ,Load Runner and Test Director till now and atleast please let me know new features for each version. Ex QTP8.2,QTP 8.5.QTP9.2 supports Mozilla 2.0

1 Answers   DELL,


Categories