Forum Discussion
Below are the links which are discussed similar topics,
Post here, if you got any errors
Thanks for your answer I had tried it but it is showing microsoft vbscript runtime error.Somehow code is not able to upload library file.
sAutoAppPath = "D:\BTAAF\FunctionLibrary\CommonFunction.vbs"
Call Sys.OleObject("WScript.Shell").Run(sAutoAppPath)
Function Sum()
call killProcess("Excel.exe")
End function
- shankar_r9 years agoCommunity Hero
For me below code is working fine, I'm able to trigger the VBS file
Function triggerVBS path = "D:\Users\Desktop\Test.vbs" 'Way1 WshShell.Run(path) 'Way2 Call Sys.OleObject("WScript.Shell").Run(path) End Function- Ravik9 years agoSuper Contributor
I am also interested to know this.
Using this code
Function triggerVBS
path = "D:\Users\Desktop\Test.vbs"
'Way1
WshShell.Run(path)
'Way2
Call Sys.OleObject("WScript.Shell").Run(path)
End FunctionWe can load the .vbs file but we can not call the functions from inside of the functions.
lets say If I have creates multiple function like - add, divide, multiply etc or login, new order, logout
here we can't call these functions in TC. is there any way to call functions (add, divide, multiply etc or login, new order, logout) from .vbs file.
- tristaanogre9 years agoEsteemed Contributor
The VBS file can, probably, be added as an Existing script file directly in TestComplete. There's no need to load the library using the WScript.shell.