Automation testing QTP with VB Script functions Interview questions


Total available count: 68
Subject - Software Testing
Subsubject - Automation testing QTP with VB Script functions

Property: AtEndOfLine?

It indicates whether the file pointer is positioned immediately before the end-of-line marker in a TextStream file.

Syntax: objTso.AtEndOfLine

Arguments:
objTso: (Required) The name of a TextStream Object previously instantiated.

Example:    

Set fso=createobject("Scripting.FileSystemObject")
'Open the file "qtptest.txt" in writing mode.
Set qfile=fso.OpenTextFile("C:qtptest.txt",2,True)
'write contents to the file into newline.
qfile.Writeline  "Welcome to the World of QTP"
'Open the file "qtptest.txt" in reading mode.
Set qfile=fso.OpenTextFile("C:qtptest.txt",1,True)
Do while qfile.AtEndOfLine <> true
Msgbox  qfile.Read(1)  'Output --> The file will be read word by word. 
Loop
'Close the files.
qfile.Close
'Release the allocated objects.
Set qfile=nothing
Set fso=nothing

 




Next 2 interview question(s)

1
Property: AtEndOfStream?
2
Explain TimeValue Function?

Comments