public void ReportDailyJournal_Dagens()
        {
            //TC#63787
            #region Private Variables
            var caseId             = string.Empty;
            var caseTitle          = "ReportDailyJournal_Dagens";
            var registryEntryTitle = "Registry Entry";
            #endregion

            #region Login to RM module with Guilt user
            Selenium_Run((driver) =>
            {
                //Step 1

                #region Login to RM Module
                FrontPage.LoginToApplication(driver);
                #endregion

                #region Create a case
                CasePage casePage = CasePage.Connect(driver);
                casePage.CreateCase(caseTitle);
                CommonMethods.PlayWait(5000);
                caseId = casePage.GetCaseNumber();
                #endregion

                #region Create a Outgoing registry entry
                RegistryEntryPage registryEntry = RegistryEntryPage.Connect(driver);
                casePage.ClickOnButton("Registry entries");
                registryEntry.CreateRegistryEntry(RegistryEntryType.OutgoingType.GetStringValue());
                registryEntry.AddRegTitle(registryEntryTitle);
                registryEntry.AddRegToAddress("AA");
                registryEntry.ClickSaveBttn();
                #endregion

                #region Check the different reports and verify that parts of Registry entry title
                #region Journal daily Report
                #region PDF
                ReportPage reportPage = new ReportPage(driver);
                reportPage.ClickReportByTypeAndName("Journaler", "Journal (dagens)");
                reportPage.ReportPopUpFileFormats(ReportFormat.PDF.GetStringValue(), "Utgående post/Outbound", "Reservert", "0");
                CommonMethods.PlayWait(10000);
                //Step 2
                reportPage.ReportVerification(ReportFormat.PDF.GetStringValue(), "Journal", caseTitle, registryEntryTitle);
                reportPage.CloseCurrentBrowserTab();
                #endregion
                #endregion
                #endregion

                #region Logout from RM Module
                LogoutPage logoutPage = new LogoutPage(driver);
                logoutPage.LogoutApplication();
                #endregion
            });
            #endregion
        }
        public void ConvertDocumentIntoPDF()
        {
            #region Private Variables
            var caseId             = string.Empty;
            var caseTitle          = "Case to Convert the document into PDF";
            var registryEntryTitle = "Registry Entry";
            #endregion

            Selenium_Run((driver) =>
            {
                FrontPage.LoginToApplication(driver);

                #region Create case with access code
                CasePage casePage = CasePage.Connect(driver);
                casePage.AddTitle(caseTitle);
                casePage.SaveCase();
                CommonMethods.PlayWait(5000);
                caseId = casePage.GetCaseNumber();
                #endregion

                #region Add U-type Registry Entry
                RegistryEntryPage regEntry = RegistryEntryPage.Connect(driver);
                regEntry.CreateRegistryEntry(RegistryEntryType.OutgoingType.GetStringValue());
                regEntry.AddRegTitle(registryEntryTitle);
                regEntry.AddRegToAddress("AA");
                DocumentPage documentPage = DocumentPage.Connect(driver);
                documentPage.ClickAndAddDocTemplate(AttachmentType.Message.GetStringValue());
                documentPage.AddMessageForDocument("Convert the message into PDF");
                regEntry.ClickSaveBttn();
                #endregion

                #region Change registry entry status to F/done
                regEntry.ClickEditButton();
                regEntry.ChangeREStatusToFerdigOrDone();
                regEntry.ClickSaveBttn();
                #endregion

                #region Convert document to PDF from Attachment/Message
                documentPage.ViewAttachmentInformation("Registry Entry", "Convert to PDF", 1);
                CommonMethods.PlayWait(3000);
                CommonMethods.RefreshBrowserWindow(driver);
                CommonMethods.RefreshBrowserWindow(driver);
                CommonMethods.PlayWait(15000);
                #endregion

                #region Verify the Document is Converted to PDF
                documentPage.VerifyDocumentOrMessageIsConvertedToPDF();
                #endregion

                #region Logout from RM Module
                LogoutPage logoutPage = LogoutPage.Connect(driver);
                logoutPage.LogoutApplication();
                #endregion
            });
        }
        public void CasePartyScreenedOrRestricted()
        {
            // #Case 138908
            #region Private variables
            var caseId = string.Empty; var caseId2 = string.Empty;
            var caseScreenedTitle   = string.Format("Case party screened or restricted");
            var caseUnScreenedTitle = string.Format("Case party unscreened not restricted");
            #endregion

            #region Case Level - Step 1 to 4
            //Pre-requisite
            #region ---- Admin Module - Prereq ----
            Selenium_Run((driver) =>
            {
                #region Login to Admin Module
                FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue());
                #endregion

                #region Navigate to Tilgangskoder and check the Access code is 6 is setup
                AdminstratorPage adminPage = new AdminstratorPage(driver);
                adminPage.NavigateToMenuItem("Brukeradministrasjon/tilgangsstyring", "Tilgangskoder", "Tilgangskoder (alle)");
                adminPage.VerifyAccessCodeExist("6");
                adminPage.ClickItemInGrid("6");
                adminPage.ClickCheckBoxInAdminModuleSwitchOnOff("Hide title automatically when creating new post", true);
                adminPage.ClickCheckBoxInAdminModuleSwitchOnOff("Hide sender/recipient automatically when creating new post", true);
                adminPage.Save();
                #endregion

                #region Guilt User - authorized for access code 6 for adm unit ENG
                adminPage.NavigateToMenuItem("Person", "Person");

                adminPage.SelectPerson("GUILT");
                adminPage.AddOrEditAutorization("6", "Adm.unit", "ENG");
                #endregion

                #region Sda User - is NOT Authorized for access code 6 on adm unit ENG
                adminPage.ClickDropDownInAdminModule("Person");
                adminPage.SelectPerson("SDA");

                adminPage.RemoveAutorization("6", "SDA");
                #endregion

                #region Logout from Admin Module
                LogoutPage logoutPage = new LogoutPage(driver);
                logoutPage.LogoutApplication();
                #endregion
            });
            #endregion

            //Step 1-3
            #region Login to RM module with Guilt user as TstIndia1
            Selenium_Run((driver) =>
            {
                #region Login to RM Module as User 1 -Guilt
                FrontPage.LoginToApplication(driver);
                #endregion

                #region Create new Case and edit title
                CasePage casePage = new CasePage(driver);

                casePage.AddTitle(caseScreenedTitle);
                casePage.SelectKendoDropdownAndAddValue("Access code", "6");
                casePage.SaveCase();
                caseId = casePage.GetCaseNumber();
                #endregion

                #region create a new case party and add restricted (checkbox)
                casePage.AddParties("Short name", "AA");
                #endregion

                #region Logout from Application
                LogoutPage logoutPage = new LogoutPage(driver);
                logoutPage.LogoutApplication();
                #endregion
            });
            #endregion

            //Step 4
            #region Login to RM module with user 2 SDA
            Selenium_Run((driver) =>
            {
                #region Login to RM Module as User 2 - SDA User
                FrontPage.LoginToApplication(driver, ApplicationModules.RecordManagement.GetStringValue(), "SDA", "SDA");
                #endregion

                #region Open Case Number and verify the case parties is resticted
                CasePage casePage = new CasePage(driver);
                casePage.QuickSearchCaseId(caseId);
                casePage.VerifyCasePartryIsRestricted("*****", true);
                #endregion

                #region Logout from Application
                LogoutPage logoutPage = new LogoutPage(driver);
                logoutPage.LogoutApplication();
                #endregion
            });
            #endregion

            //Step 5
            #region Login to RM module with user 1 Guilt
            Selenium_Run((driver) =>
            {
                #region Login to RM Module as User 1 - Guilt User
                FrontPage.LoginToApplication(driver);
                #endregion

                #region Open Case Number and verify the case parties is resticted
                CasePage casePage = new CasePage(driver);
                casePage.CreateCase(caseUnScreenedTitle);
                caseId2 = casePage.GetCaseNumber();
                #endregion

                #region create a new case party and add restricted (checkbox)
                casePage.AddParties("Short name", "AA", false);
                #endregion

                #region Logout from Application
                LogoutPage logoutPage = new LogoutPage(driver);
                logoutPage.LogoutApplication();
                #endregion
            });
            #endregion

            #region Login to RM module with user 2 SDA
            Selenium_Run((driver) =>
            {
                #region Login to RM Module as User 2 - SDA User
                FrontPage.LoginToApplication(driver, ApplicationModules.RecordManagement.GetStringValue(), "SDA", "SDA");
                #endregion

                #region Open Case Number and verify the case parties is resticted
                CasePage casePage = new CasePage(driver);
                casePage.QuickSearchCaseId(caseId2);
                casePage.VerifyCasePartryIsRestricted("Anda Apotek", false);
                #endregion

                #region Logout from Application
                LogoutPage logoutPage = new LogoutPage(driver);
                logoutPage.LogoutApplication();
                #endregion
            });
            #endregion
            #endregion
        }