Sunday, March 6, 2016

Mapping or laoding OR @ runtime

**************************************************************
Mapping or laoding OR @ runtime
**************************************************************

Below is the function to upload the OR's @ runtime on specified folders



Function MapObjectRepositories()
On Error Resume Next

strObjectRepositoryPath = Environment.Value("strMasterTestSuitePath") & "\ObjectRepository\"
RepositoriesCollection.RemoveAll

Set objFSO  = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(strObjectRepositoryPath) Then
Set objFolder = objFSO.GetFolder(strObjectRepositoryPath)

For Each objFile In objFolder.Files
If Right(objFile.Name,  3) = "tsr" Then
RepositoriesCollection.Add strObjectRepositoryPath & objFile.Name
End If
Next
End If

Set objFSO = Nothing
End Function

No comments:

Post a Comment