Answer Posted / 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 |
Post New Answer View All Answers
one screen page,that contains file , browse , update and cancel buttons.when we browse a file it should get update otherwise it should go to previous page.write negative test case for that.
Hi friends did any budy attend accenture system test for qtp? if any budy pls drop questions.not only accenture any other mnc company which you attended system test(QTP)?it may helpful to others also
Does quicktest professional is unicode compatible?
Your roles and responsibilities and daily tasks? (As automation tester)
How many types of actions are there in quicktest professional (qtp)?
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
How to use Environment parameterization? Explain with an example.
What is ObjectParamater?
What are test settings and global settings?
what is profile tool?
How to associate function library at a run time?
Difference between copy to action and call to action?
Hi,All How to create a link in excel sheet using qtp
How can you pass value one action to another action?
tell me abt a time when u had to go above &beyind the call of duty to get the job done