kavansays
10 years agoContributor
TestedApps object properties
I am trying to create Tested app runrime, i am trying to cover below scenario.. If MyTestedApp Exist in project -> update properties If MyTestedApp not Exist in project -> Create My Tested App w...
- 10 years ago
@kavanshah wrote:
Below is the code i used:
sAutoAppPath = "E:\AutomationDir\start_dms.bat"
ind = TestedApps.Add(sAppName, Application = sAutoAppPath , count = 1, launch = True, WorkDir = "E:\AutomationDir ")
VBScript doesn't support the ParamName = Value syntax in subroutine calls. You need to specify just the parameter values in the appropriate order:
sAutoAppPath = "E:\AutomationDir\start_dms.bat" ind = TestedApps.Add(sAutoAppPath, "", 1, True, "E:\AutomationDir")
Note that the default name for items in TestedApps is the file name component of the path, in your example it will be start_dms. You can specify a custom name for the added app like this:
TestedApps.Items(ind).ItemName = "INDMS_QA"
- 10 years ago
The application path is the first parameter of the TestedApps.Add method:
ind = TestedApps.Add("%AutoDir%\Applications\InDMSApp_QA\bin\start_dms.bat", "", 1, True, "E:\AutomationDir")
Or, using a variable:
sAutoAppPath = "%AutoDir%\Applications\InDMSApp_QA\bin\start_dms.bat"
ind = TestedApps.Add(sAutoAppPath, "", 1, True, "E:\AutomationDir")