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


Messages In This Thread
Give path in .vbs file - by topnil - 11-03-2009, 04:58 PM
RE: Give path in .vbs file - by Saket - 11-03-2009, 05:46 PM
RE: Give path in .vbs file - by topnil - 11-04-2009, 10:26 AM

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,238 12-16-2011, 01:21 PM
Last Post: prashants1
Exclamation how to Pass Optional Parameters in VBS? ShrikantBiradar3449 1 8,301 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: 2 Guest(s)