Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Give path in .vbs file
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi All ,

I am using .vbs file to start QTP , in .vbs i want to give relative path ,
some how i gave it but not worked

what can be the issue ?

This is my .vbs file

Code:
dim folder, path , path2
dim arg1,arg2
Set args=WScript.Arguments
arg1=args.item(0)
path2 = "..\..\bin\GetAc"

Dim qtpApp    
Dim qtpTest      
Set qtpApp = CreateObject("QuickTest.Application")
qtpApp.Visible = true
if arg1=1 then
qtpApp.Open path2, True  
else
qtpApp.Open path2, True  
end if
Set qtpTest = qtpApp.Test  
qtpTest.Run
qtpTest.Close
qtpApp.quit
Set qtTest = Nothing
Set qtApp = Nothing
if arg1=1 then
path = "..\..\Downloads"
set filesys=CreateObject("Scripting.FileSystemObject")
Set folder = filesys.CreateFolder(path)
end if

path variable is working and path2 is not working , it gives 'cannot open test' error

Thanks in advance
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
This is not supported in QTP AOM, you should use the abosulte path to open a test. You can get the absolute path using 'filesys.GetAbsolutePathName' and then open the script.

Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Saket

Thanks for help, it works
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  VBScript Certification Path qapandit 0 2,899 09-10-2013, 04:13 AM
Last Post: qapandit
  .vbs script error when trying to insert a value in a sapguitable frebuffi 5 6,843 07-18-2013, 03:04 PM
Last Post: Staff
  VBS to DLL to QTP ssco77 5 12,239 12-16-2011, 01:21 PM
Last Post: prashants1
Exclamation how to Pass Optional Parameters in VBS? ShrikantBiradar3449 1 8,303 06-13-2011, 03:12 AM
Last Post: Skepsis
  DP and called .vbs make for slow runtime wheelercha 0 1,900 01-05-2011, 02:39 AM
Last Post: wheelercha

Forum Jump:


Users browsing this thread: 1 Guest(s)