'###############################################################################
'
' Script Name : Setup
'
' Created By : Miken Gandhi
' Created Date: 26-Feb-2007
'
' Description : This module defines configurations for the Consumer Portal scripts
' constants, variables, exceptions, and GUI maps .
' This module is called at the beginning of the Consumer Portal Main Script
'
' Sections :
' 1) Set Constants
' 1.1 Select Transaction
' 1.2 Select Environment
'
'################################################################################
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' 1.0 Set Constants
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' 1.1 Select Transaction
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tTranxnList = Array("Medical Claim","Medical Elig & Ben","Medical Cost Tracker","Dental Claim","Dental Elig & Ben","Dental Cost Tracker", "Pharmacy Elig & Ben", "Pharmacy Claim")
kTranxn = f_Create_List_Dialog("Consumer Portal Functionality", "Which transaction are you testing?", tTranxnList)
environment.Value("kTranxn") = kTranxn
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' 1.2 Select Environment
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tEnvList = Array("System Acceptance","Stage","Other Environment")
kEnv = f_Create_List_Dialog("Select Environment", "Select one:", tEnvList)
If kEnv = "System Acceptance" Then
kURL = "https://a-memberportal.cigna.com/corp/portal/app/member/public/guest"
elseif kEnv = "Stage" Then
kURL = "https://s-memberportal.cigna.com/corp/portal/app/member/public/guest"
elseif kEnv = "Other Environment" Then
kURL = inputbox("Please provide the URL for execution", "Other Environment")
End If
environment.Value("kURL") = kURL
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' 1.3 Select RunMode
' Basic ---> For Comparing Actual to Expected
' Autopopulate ---> For Autopopulating Actual in the datatables.
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tRunMode = Array("Basic - For Regression","Autopopulate - For Dataload")
kRunMode = f_Create_List_Dialog("Run Mode", "Which run mode?", tRunMode)
environment.Value("kRunMode") = kRunMode
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' 1.4 Select Data table and store it in Environment variable.
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++
fpathDataTable = Environment("fpathDataTable")
call f_OpenFileDialog(fpathDataTable, kDataTable)
Environment.Value("KDataTable") = kDataTable
If kDataTable="" Then
exitrun
end if
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' 1.5 Create a Run Name for the Current Execution Cycle.
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Call f_GetCurrentDateTime(tTime)
environment.Value("kRunName") = tTime
' ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' 1.6 Copy/rename data table (also creates directory structure for test results)
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++
call f_SetupRunResultsI()
' ' ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' ' 1.7 Open URL selected after closing all the open browsers.
' '++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' Call f_CloseOpenBrowsers()
' set IE = CreateObject("InternetExplorer.Application")
' IE.Visible = true
' IE.Navigate kURL
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' 1.8 Transaction specific settings
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if kTranxn = "Medical Claim" Then
environment.Value( "kTranxn" )= "MedClaim"
call f_InitializeArrays_MedClaim( )
elseif kTranxn = "Dental Claim" then
environment.Value( "kTranxn" ) = "DenClaim"
call f_InitializeArrays_DenClaim( )
elseif kTranxn = "Medical Elig & Ben" then
environment.Value( "kTranxn" ) = "MedEB"
call f_InitializeArrays_MedEB( )
elseif kTranxn = "Dental Elig & Ben" then
environment.Value( "kTranxn" ) = "DenEB"
call f_InitializeArrays_DenEB( )
elseif kTranxn = "Medical Cost Tracker" then
environment.Value( "kTranxn" ) = "MedCT"
call f_InitializeArrays_MedCT( )
elseif kTranxn = "Dental Cost Tracker" then
environment.Value( "kTranxn" ) = "DenCT"
call f_InitializeArrays_DenCT( )
elseif kTranxn = "Pharmacy Elig & Ben" then
environment.Value( "kTranxn" ) = "PharmEB"
call f_InitializeArrays_PharmEB( )
elseif kTranxn = "Pharmacy Claim" then
environment.Value( "kTranxn" ) = "PharmClaim"
call f_InitializeArrays_PharmClaim( )
else
Msgbox("Unknown Transanction. Exiting!!!")
End If