Hi Friends,
In my code I've a variable decalred "Dim notLaunched" before a Select statement and later with in the select statement its used to define to zero and later modified in an If loop to "1". but one its out of if loop the value of variable is coming back to "0". I couldn't understand why is it like that.
I changed the code to "Static notLaunched" there is an syntax error.
I put it as public same issue. Please help me ...
Here is my code ..
In my code I've a variable decalred "Dim notLaunched" before a Select statement and later with in the select statement its used to define to zero and later modified in an If loop to "1". but one its out of if loop the value of variable is coming back to "0". I couldn't understand why is it like that.
I changed the code to "Static notLaunched" there is an syntax error.
I put it as public same issue. Please help me ...
Here is my code ..
Code:
Dim notLaunched
Select Case appName
Case "CCP"
'Start CCP application
curTime = Now
SystemUtil.Run "CiscoCP.exe", "", APP_PATH
notLaunched = 0
wait 2
'If CCP Is already running
RunAction "waitAppear", oneIteration, "Select / Manage Community"
If Window("CCP").FlexApplication("Main").FlexTitleWindow("Select / Manage Community").Exist(2) Then
notLaunched = 1
logger "info", "Application started in " & DateDiff("s", curTime, Now) & " seconds"
Reporter.ReportEvent micDone, "Application", "Application started in " & DateDiff("s", curTime, Now) & " seconds"
wait 3
ExitAction(2)
Else
notLaunched = 0
logger "info", "CCP Failed to Launch after waiting " & DateDiff("s", curTime, Now) & " seconds"
Reporter.ReportEvent micDone, "Application", "CCP Failed to Launch after waiting " & DateDiff("s", curTime, Now) & " seconds"
Reporter.ReportEvent micDone, "Application", "CCP is Relaunching NOW " & DateDiff("s", curTime, Now) & " seconds"
End If
While notLaunched < 1
RunAction "exit", oneIteration, "CCP"
wait 5
curTime = Now
RunAction "launch", oneIteration, "CCP"
WEnd
wait 5 'Add a delay of 5 seconds after Select/Manage Community is active
logger "info", "Application started in " & DateDiff("s", curTime, Now) & " seconds"
Reporter.ReportEvent micDone, "Application", "Application started in " & DateDiff("s", curTime, Now) & " seconds"
End Select