Automation testing QTP with VB Script functions interview questions


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

Method: GetDrive?

It returns a Drive object corresponding to the drive for a specified path.

Syntax: objDrv = fso.GetDrive(drivespec)

Arguments:
fso: (Required) The name of a FileSystemObject object previously instantiated.
drivespec: (Required) The drivespec argument can be a drive letter (c), a drive letter with a colon appended (c:), a drive letter with a colon and path separator appended (c:), or any network share specification (\computer2share1).

Example: 

Set fso=createobject("Scripting.FileSystemObject")
'Drive for  getting details  Sourcefile="C:"  Set get_drv=fso.GetDrive(Sourcefile).
 'Some of the following details can be retrieved from a drive.
msgbox  get_drv.AvailableSpace
Msgbox  get_drv.DriveLetter
msgbox  get_drv.DriveType
msgbox  get_drv.FileSystem
msgbox  get_drv.FreeSpace
msgbox  get_drv.Path
Msgbox  get_drv.RootFolder
Msgbox  get_drv.SerialNumber
Msgbox  get_drv.TotalSize
Set fso=nothing

 




Next 5 interview question(s)

1
Method: GetFile?
2
Method: GetFolder?
3
Method: MoveFolder?
4
Method: Read?
5
Method: ReadAll?


Comments