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
Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.
When ‘option explicit’ keyword is used in qtp?
What is checkpoints for quicktest professional (qtp)?
Explain the check points in quicktest professional (qtp)?
hi can anybody help with an qtp 9.2 license key please. Thanks, Nitesh.
Differentiate the type of test cases which can be automated and which cannot be automated?
Hi Guys, I want to place all of my values which i am getting it from a loop in to a global shee. For that i had written the script like this For i = 1 to ECOs-1 ECO = List(i).GetROProperty("innertext") DataTable.AddSheet("ECOList") DataTable.GetSheet("ECOList").AddParameter "ECOList",ECO AbortECO = DataTable.GetSheet("ECOList").GetParameter ("ECOList").Value msgbox AbortECO DataTable.GetSheet("ECOList").SetNextRow Using the above script, whenever the loop iterates it is creating new column "ECOLIST" in the sheet called "ECOLIST". It means, the values are displaying in the column wise even though i added the script " DataTable.GetSheet("ECOList").SetNextRow" . The cursor is not moving to the next line. Anybody help me out how to pass the values from script to the excel(Global/Local) sheet. Pls let me know @ nbabu11@gmail.com if you are not clear about the question.
action contains public and private functions but do we resuable that action or not..If it is reusable How..plz tell me the ans
What is the difference between keyword view and expert view?
How to capture all the data of a webtable, weblist and combolist using QTP?
Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.
Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.
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
What is the use of defining a newobject in the object repository "Define New TestOject". How to use this further. If we define new testobject, how can it recognizes the objects properties of any application.
Print the Prime numbers in below format only up to 20(Need commas also) 1,2,3,5,7,9,11,13,17,19