Use the code below,
In either case you have mentioned above, it will give you "D:\Tests\Automation\AUT\" as path.
Hope it helps.
Let me know in case of any questions.
Thanks,
Elango
Code:
Dim GetAUTRootFolder, RelPath
GetAUTRootFolder = Pathfinder.locate("..\..\..\")
'Assuming the path returned by pathfinder utility is ""D:\Tests\Automation\AUT\Test Scripts\High level suite\Low level suite\"
If Instr(GetAUTRootFolder,"Test Scripts\") Then
RelPath = Split(GetAUTRootFolder,"Test Scripts\")
GetAUTRootFolder = RelPath(0)
End If
Msgbox GetAUTRootFolder
In either case you have mentioned above, it will give you "D:\Tests\Automation\AUT\" as path.
Hope it helps.
Let me know in case of any questions.
Thanks,
Elango