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 with specific properties.
Here i am trying to create my tested app with below specified properties but failed to create it with specifies properties..
Requirement:
Name= Mytestedapp
Runmode = simple
Count = 1
autorun application on recording = false
launch application from tests = false
application: ..\..\..\..\Applications\InDMSApp_QA\bin\start_dms.bat
command-line parameters:
working folder: E:\AutomationDir
Actually created with below properties:
Name= Mytestedapp
Runmode = simple
Count = 1
autorun application on recording = false
launch application from tests = false
application:
command-line parameters: ..\..\..\..\Applications\InDMSApp_QA\bin\start_dms.bat
working folder:
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 ")
Can anyone please suggest how to update application parameter(highlighted below) through code ?
@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"
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")