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

Explain about datafile/verification of date file when file is not available in local system?

2218


What test cases can you automate using QTP?

636


How can i test an application like Google Earth.In my application data will be fetched from a oracle database based upon which graphs are generated..so these all are dynamic..how can i use qtp here..alongwith that how can i test the map generated by a satellite just like google earth..

1711


What is the difference between qtp and selenium?

539


give me an example where u used good judgement and logic in solving a problem

3347






write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))

1494


when I try to run below script in QTP "totalPages" value is 2. But i am getting error message (Type mismatch: 'totalPages' Line (): "For i=1 to totalPages".) totalPages=Browser("Name:=User").Page("Title:=User").WebElem ent("innertext:=of.*").GetROProperty("InnerText") msgbox totalPages For i=1 to totalPages rnum=Browser("Name:=User").Page("Title:=User").WebTa ble("column names:=User Name;ID;Last Name;First Name").GetRowWithCellText("store4") If rnum>0 Then r=rnum Exit for End If Browser("Name:=User").Page("Title:=User").WebElement ("html tag:=A","x:=471").Click MsgBox "Exit" Next

3260


What is Port testing. Whhen will you perform?

1488


Explain the concept of object repository and how quicktest professional (qtp) recognises objects?

599


Hi All, How to get repeated word in string . Thanks Balaji

925


hi i want license key for qtp 9.2 pls its adjust product name : quick test professional locking code :8 - 54A6A license type : seat license maintenance number : 88888888-8888 pls send license key to my email id borusu.ramkumar@gmail.com

3694


wht is Manual Testing Frame work. Pls anybody can give appropriate answers

1585


What are the check points can be inserted without recording?

592


Explain different recording modes?

573


hi guys, pls tell me for testing institution training hub, hitech city is best or not?

1309