krag451
Member
Reged: 05/15/08
Posts: 43
|
|
Hi,
I am seeing a problem in QTP 9.5 where I'm getting an Invalid Procedure Call error on a VB script when QTP tries to load it. I am in the process of upgrading our 9.2 scripts to 9.5. 9.2 does not throw this error.
I have seen several posts about this on various forums including this one but so far I have not seen a solution posted. If you have a way around this can you post the solution here?
Below are more details on the error:
Line that is throwing the error: Executefile("[QualityCenter] Subject\QTP_BT\vbs_lib\Load vbs.vbs")
Here is the error: Invalid procedure call or argument
Line (1): "'-------------------------------------------------------------------------------".
Thanks
Krag
|
RealmRevo
Junior Member
Reged: 08/22/05
Posts: 119
Loc: MD
|
|
try it after removing the paranthesis: Executefile"[QualityCenter] Subject\QTP_BT\vbs_lib\Load vbs.vbs"
|
TReddy
Veteran
Reged: 01/17/07
Posts: 2565
Loc: Pittsburgh, PA
|
|
Quote:
try it after removing the paranthesis: Executefile"[QualityCenter] Subject\QTP_BT\vbs_lib\Load vbs.vbs"
Space after ExecuteFile Executefile "[QualityCenter] Subject\QTP_BT\vbs_lib\Load vbs.vbs"
|
krag451
Member
Reged: 05/15/08
Posts: 43
|
|
Thanks for the suggestions but I still get the same error, even with these changes.
The error that I put in the post is actually from the VBscript itself. This makes me think that there is something wrong with the way QTP is reading VBscript file. Do these files also have to be upgraded in some way?
|
NoUse4aName
Super Member
Reged: 06/13/08
Posts: 1720
|
|
http://www.sqaforums.com/showflat.php?Ca...amp;Main=491514
QCpath = "[QualityCenter] Subject\MainProject\Lib" FileName = "MainLib.vbs" Dim App 'As Application Set App = CreateObject("QuickTest.Application") App.Folders.Add(QCpath) TempFileName = PathFinder.Locate(FileName) ExecuteFile TempFileName Set App = Nothing
|
TReddy
Veteran
Reged: 01/17/07
Posts: 2565
Loc: Pittsburgh, PA
|
|
Post your code here that is there inside vbs.
|
Mukil_Krishna
Member
Reged: 12/03/07
Posts: 49
|
|
iam not sure whether you can give it as Executefile("[QualityCenter] Subject\QTP_BT\vbs_lib\Load vbs.vbs") usually its Executefile(Pathfinder.locate("Load vbs.vbs")) you need to add Subject\QTP_BT\vbs_lib folder into folder path.....
Also please check if the Load vbs.vbs file has got any errors...
|
Tarun Lalwani
Veteran
Reged: 07/21/05
Posts: 15329
Loc: Milwaukee, Wisconsin
|
|
If you are still getting an error then you should check your VBS file as such. I guess you might have issue in the same. Also make sure there is no option explicit at the top as even that sometimes causes issue
-------------------- Regards,
Tarun
** First ever technical novel - And I thought I knew QTP! **
** Download QTP Unplugged 2nd Edition eBook for FREE **
KnowledgeInbox RSS
|
krag451
Member
Reged: 05/15/08
Posts: 43
|
|
Thanks again for all the support and suggestions. I tried the code posted by NoUse4aName without success. I still get the same error. Below is the VB script code that is producing the error. QTP is failing on line 1. It is a comment. I'm wondering what QTP is expecting on this first line and why this changed from 9.2 to 9.5.
'#----------------------------------------------------------------------------------- '# Load Script. '#----------------------------------------------------------------------------------- '# '# VERSION: 1.1 '# '# DESCRIPTION: '# '# This function load all libraries for the test environment. It should be called '# at the start of each action. '# '#----------------------------------------------------------------------------------- '# '# REVISION HISTORY: '# '# DATE: PERSON: REASON: '# ----------- -------------- ---------------------------------------------------- '# 26-NOV-2003 R. Bolstridge Original. '# 01-NOV-2004 R. Bolstridge Function libraries are now .vbs files. '# 09-NOV-2004 R. Bolstridge Moved to C drive. '#-----------------------------------------------------------------------------------
'Define the location of the fu 'Path = "[QualityCenter] Subject\QTP_BT\vbs_lib\ReportAll.vbs" executefile("[QualityCenter] Subject\QTP_BT\vbs_lib\ReportAll.vbs" )
ExecuteFile("[QualityCenter] Subject\QTP_BT\vbs_lib\DataTableGetData.vbs") 'ExecuteFile [Quality Center] "Subject\QTP_BT\vbs_lib\ReportAll.vbs"
|
genevish
Junior Member
Reged: 07/12/04
Posts: 317
Loc: Marietta, Georgia
|
|
We had this issue too, and resorted to using relative paths for all of our function libraries and shared OR's, and attaching the libraries to the tests. Probably not much help to you...
-------------------- Scott Genevish
Principal Consultant
Designed Quality
|
MarkGrimwood
Newbie
Reged: 02/27/08
Posts: 12
|
|
I have had the same error where QTP gave a message of "Invalid Procedure Call" on the first line regardless of the contents. It was eventually tracked down to an error in one of the .qfl modules being loaded, and not the main script or QTP.
|
buststyles
Junior Member
Reged: 09/04/02
Posts: 9
Loc: Atlanta/GA/USA
|
|
All there is an updated dll file TDSerializeMgr.dll(dated 3/20/2008). Replace the old file located at “C:\Program Files\HP\QuickTest Professional\Bin\TDSerializeMgr.dll”
This should solve the problem. The file should be available from HP support.
|
Ravi1976
Member
Reged: 10/25/07
Posts: 181
Loc: Brussels, Belgium
|
|
Hi Krag,
I also faced same problem with QTP 9.5 and followed the workaround...
' Old one - Absolute path Executefile("[QualityCenter] Subject\QTP_BT\vbs_lib\Load vbs.vbs")
' New One - Relative path Executefile("Load vbs.vbs") ' before executing this line add path in QTP Options([QualityCenter] Subject\QTP_BT\vbs_lib\)
Please let me know for more information...
-------------------- Ravi - http://www.testingfaqs.co.in
***** Help others it will help you *****
|