QTP Script to get particular Row and column value from an excel sheet
QTP Script to write the data to particularRow and column value to an excel sheet
QTP Script implementing Regular Expression and creating an object.
QTP Script implementing multiple values from the excel such as different user id and password.
How To Check Whether Particular File and Folder Exists or Not in QTP?
QTP Script to check whether specified file and folder exist or not.
Data Driven Testing
Datatable Methods
Script to check particular text file exists or not.
Dim f1
Set f1 = CreateObject("Scripting.FileSystemObject")
If (f1.FileExists("D:\lakshmi.txt")) Then
Msgbox "file exists"
Else
Msgbox "file doesn't exist"
End If
FileExists Method:Returns True if a specified file exists,False if it does not.
Syntax:object.FileExists(filespec)
Above script checks text file("lakshmi")in D drive.
If text file is present "file exists" message is displayed else "file doesn't exist" message will be displayed.
Script to check particular folder exists or not.
Dim f1
Set f1 = CreateObject("Scripting.FileSystemObject")
If (f1.FolderExists("C:\laxmi")) Then
Msgbox "folder exists"
Else
Msgbox "folder doesn't exist"
End If
FolderExists Method:Returns True if a specified folder exists,False if it does not.
Syntax:object.FolderExists(folderspec)
No comments:
Post a Comment