Example #1
0
        public void CheckCompleteLoad()
        {
            SystemLog.LogAuditMessage(EntityIspf.constScrName, DiagnosticLevel.level2, MethodBase.GetCurrentMethod().Name + EntityGlobal.METHOD_START, EntityGlobal.transactionId);


            TCSRPA.XMLLibrary.ScreenIdentifier menuText = XMLLibrary.GetScreenIdentifier(EntityIspf.constScrName, EntityIspf.constMenuText);

            string menuTextCheck = null;

            objWatch.Restart();
            while (menuTextCheck == null)
            {
                if (objWatch.ElapsedMilliseconds < EntityGlobal.pageLoadWaitTime)
                {
                    menuTextCheck = MainFrameAdapter.GetScreenText(menuText.Row, menuText.Column, menuText.Length);
                    if (!(menuTextCheck.Equals(menuText.Text)))
                    {
                        throw new UINotSupported(EntityIspf.constScrName);
                    }
                }
                else
                {
                    throw new UINotSupported(EntityIspf.constScrName);
                }
            }

            SystemLog.LogAuditMessage(EntityIspf.constScrName, DiagnosticLevel.level2, MethodBase.GetCurrentMethod().Name + EntityGlobal.METHOD_END, EntityGlobal.transactionId);
        }
Example #2
0
        public void DoOperations()
        {
            string ispfText = XMLLibrary.GetName(EntityPwd.constScrName, EntityPwd.constIspf);

            TCSRPA.XMLLibrary.TextSetter pwdValue = XMLLibrary.GetTextSetter(EntityPwd.constScrName, EntityPwd.constPwdValue);

            MainFrameAdapter.SetTextOnScreen(pwdValue.Row, pwdValue.Column, CryptSecurity.ConvertToUnsecureString(EntityGlobal.pswd));
            Thread.Sleep(1000);
            MainFrameAdapter.SendKey(PcomKeys.Enter);

            #region Navigate till Ispf screen

            //ICH70001I RPASAR   LAST ACCESS
            MainFrameAdapter.SendKey(PcomKeys.Enter);

            //Notice screen
            MainFrameAdapter.SendKey(PcomKeys.Enter);

            //Notice screen - continue
            MainFrameAdapter.SendKey(PcomKeys.Enter);

            //ZIOEC screen
            MainFrameAdapter.SendKey(PcomKeys.Enter);

            MainFrameAdapter.SendKey(ispfText);
            Thread.Sleep(1000);
            MainFrameAdapter.SendKey(PcomKeys.Enter);

            #endregion

            SystemLog.LogAuditMessage(EntityPwd.constScrName, DiagnosticLevel.level2, MethodBase.GetCurrentMethod().Name + EntityGlobal.METHOD_END, EntityGlobal.transactionId);
        }
Example #3
0
        public void DoOperations()
        {
            TCSRPA.XMLLibrary.TextSetter AppName = XMLLibrary.GetTextSetter(EntityTSO.constScrName, EntityTSO.constAppName);

            MainFrameAdapter.SetTextOnScreen(AppName.Row, AppName.Column, AppName.Text);
            Thread.Sleep(1000);
            MainFrameAdapter.SendKey(PcomKeys.Enter);

            SystemLog.LogAuditMessage(EntityTSO.constScrName, DiagnosticLevel.level2, MethodBase.GetCurrentMethod().Name + EntityGlobal.METHOD_END, EntityGlobal.transactionId);
        }
Example #4
0
        public void DoOperations()
        {
            GlobalHelper.GetUserPwd(EntityGlobal.appName);

            TCSRPA.XMLLibrary.TextSetter userIdValue = XMLLibrary.GetTextSetter(EntityUserId.constScrName, EntityUserId.constUserIdValue);
            MainFrameAdapter.SetTextOnScreen(userIdValue.Row, userIdValue.Column, CryptSecurity.ConvertToUnsecureString(EntityGlobal.userId));
            Thread.Sleep(1000);
            MainFrameAdapter.SendKey(PcomKeys.Enter);

            SystemLog.LogAuditMessage(EntityUserId.constScrName, DiagnosticLevel.level2, MethodBase.GetCurrentMethod().Name + EntityGlobal.METHOD_END, EntityGlobal.transactionId);
        }
Example #5
0
        static void Main(string[] args)
        {
            Console.WriteLine("=============================================================");
            Console.WriteLine("============== AUTO BUILD UTILITY TOOL ======================");
            Console.WriteLine("============== @Author: Cam Thang Duong =====================");
            Console.WriteLine("============== @Date: November 18, 2016 =====================");
            Console.WriteLine("=============================================================");
            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine("Initalize environment");
            Console.WriteLine();
            ///
            /// Get the current path where the application launched
            /// Our template re-defined path is C:\GIT
            /// In order to builds the audit patch, the folder named BUILDS is required where the source folder is
            ///
            string     appPath             = Application.ExecutablePath;
            string     appFolder           = Path.GetDirectoryName(appPath);
            string     makeBuildDocPath    = Path.Combine(appFolder, "Make Build.cvw");
            string     buildVersionXMLPath = Path.Combine(appFolder, "Version.xml");
            string     iniFilePath         = Path.Combine(appFolder, "Library", "silentcwp.ini");
            XMLLibrary xml;

            string [] buildVersion;
            string [] newVersion = new string[4];
            IOLibrary ioUtil     = new IOLibrary();

            // Create a BUILDS Folder if it does not exist
            // Clean up everything from previous build process
            Console.WriteLine("Cleaning up the BUILDS folder");
            Console.WriteLine();
            string buildFolder = Path.Combine(appFolder, "BUILDS");

            try
            {
                if (Directory.Exists(buildFolder))
                {
                    ioUtil.DeleteFolder(buildFolder);
                }
                Directory.CreateDirectory(buildFolder);
            }
            catch (IOException e)
            {
                // Could not delete folder or unable to create folder
            }
            if (Directory.Exists(buildFolder) && File.Exists(makeBuildDocPath) && File.Exists(buildVersionXMLPath) && File.Exists(iniFilePath))
            {
                ///
                /// Only continue if the folder exist, we might not able to delete folder from previous build but it is not prevent the build process
                /// Because the template packager not ready for C# yet
                /// Will implement by calling CVConvert to open and run the script from Make Build document
                ///
                Console.WriteLine("Reading build version");
                Console.WriteLine();
                xml = new XMLLibrary(buildVersionXMLPath);
                // Read version from Version.xml
                buildVersion  = xml.ReadVersionFromXML();
                newVersion[0] = buildVersion[0];
                newVersion[1] = buildVersion[1];
                newVersion[2] = (Convert.ToInt32(buildVersion[2]) + 1).ToString(); // Increase the build to 1 for next build
                newVersion[3] = "A";
                // Write it back to Vesion.xml
                xml.WriteVersionToXML(newVersion);

                BuildProcess buildProcess = new BuildProcess(makeBuildDocPath, buildVersion);
                // Build PCUTIL
                string cwpPCUTIL = buildProcess.BuildPCUTIL();
                buildProcess.CleanUpAfterBuild(ioUtil.GetParentFolderFromFilePath(cwpPCUTIL));
                // Build Audit CWI
                string cwpCWIUpdate = buildProcess.BuildAuditCWI();
                buildProcess.CleanUpAfterBuild(ioUtil.GetParentFolderFromFilePath(cwpCWIUpdate));
                buildProcess.CopyIniFile(ioUtil.GetParentFolderFromFilePath(cwpCWIUpdate), iniFilePath);
                // Build Audit INT
                string cwpINTUpdate = buildProcess.BuildAuditINT();
                buildProcess.CleanUpAfterBuild(ioUtil.GetParentFolderFromFilePath(cwpINTUpdate));
                buildProcess.CopyIniFile(ioUtil.GetParentFolderFromFilePath(cwpINTUpdate), iniFilePath);
                // Build Audit US
                string cwpUSUpdate = buildProcess.BuildAuditUS();
                buildProcess.CleanUpAfterBuild(ioUtil.GetParentFolderFromFilePath(cwpUSUpdate));
                buildProcess.CopyIniFile(ioUtil.GetParentFolderFromFilePath(cwpUSUpdate), iniFilePath);

                PatchTemplate patchProcess = new PatchTemplate();
                // Patch Audit CWI
                patchProcess.PatchAuditCWI(cwpCWIUpdate);
                // Patch Audit INT
                patchProcess.PatchAuditINT(cwpINTUpdate);
                // Patch Audit US
                patchProcess.PatchAuditUS(cwpUSUpdate);
            }
        }
Example #6
0
 public void ExtractElements()
 {
     incorrectUserIdText = XMLLibrary.GetScreenIdentifier(EntityPwd.constScrName, EntityPwd.constIncorrectUserIdLbl);
     incorrectUserIdMsg  = MainFrameAdapter.GetScreenText(incorrectUserIdText.Row, incorrectUserIdText.Column, incorrectUserIdText.Length);
 }