Ad Home

Theme images by kelvinjay. Powered by Blogger.

Travel

Header Ads

Java

Selenium

UFT

Framework

General QA Concept

BDD

» » QTP code to check if a txt file is available or not, if not creating the File

Below is the code for QTP to check if a txt file is available or not, if not creating the File
strDirectory="D:\"

strFile="Scripting.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(strDirectory & strFile) Then
Set objFolder = objFSO.GetFolder(strDirectory)
Else
Set objFile = objFSO.CreateTextFile("D:\Log.txt")
End if

«
Next
Newer Post
»
Previous
Older Post

No comments:

Leave a Reply