示例#1
0
        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
            });
        }
示例#3
0
        public void InheritDisposalCodeFromCaseToReg()
        {
            //TC#19026

            #region ---- Variable Declaration ----

            #region Variables
            string PreservationTimeLabel = "Preservation time";
            string disposalCodeLabel     = "Disposal code";
            string preservationTime10    = "10";
            string preservationTime6     = "6";
            string disposalCodeValue     = "Kasseres";
            string classificationCode    = "221";
            string caseTitle1            = "Inherit disposal code from case to registry entry - Case 1";
            string caseTitle2            = "Inherit disposal code from case to registry entry - Case 2";
            string registryEntryTitle    = "RegEntry";
            #endregion

            #endregion

            #region ---- Systemadministrasjon Module ----
            Selenium_Run((driver) =>
            {
                #region Instanstiation
                var logoutPage = LogoutPage.Connect(driver);
                var adminPage  = AdminstratorPage.Connect(driver);
                #endregion

                #region Login to Admin Module
                FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue());
                #endregion

                #region Navigate to Arkivstruktur-->Arkivdeler--> Arkivdeler (all) And Click PA1
                adminPage.NavigateToMenuItem("Arkivstruktur", "Arkivdeler", "Arkivdeler (alle)");
                CommonMethods.PlayWait(2000);
                adminPage.ClickItemInGrid("PA1");
                #endregion

                #region Update Disposal Code & Preservation Time 10 yrs for the PA1
                CommonMethods.PlayWait(8000);
                driver.SendTextToTextBoxField(PreservationTimeLabel, preservationTime10);
                adminPage.SelectKendoDropdownAndAddValue(disposalCodeLabel, disposalCodeValue);
                adminPage.Save();
                #endregion

                #region Verify disposal code and preservation time 10 are updated
                Assert.IsTrue(adminPage.GetPreservationTime() == preservationTime10, string.Format("Preservation Time {0} is not updated in Admin Module", preservationTime10));
                Assert.IsTrue(adminPage.GetDisposalCode() == disposalCodeValue, string.Format("Disposal Code {0} is not updated in Admin Module", disposalCodeValue));
                #endregion

                #region Logout from Application
                logoutPage.LogoutApplication();
                #endregion
            });
            #endregion

            #region ---- Saksbehandling Module ----

            Selenium_Run((driver) =>
            {
                #region Instantiation
                var casePage      = CasePage.Connect(driver);
                var adminPage     = AdminstratorPage.Connect(driver);
                var registryPage  = RegistryEntryPage.Connect(driver);
                var dashboardPage = DashboardPage.Connect(driver);
                var logoutPage    = LogoutPage.Connect(driver);
                #endregion

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

                #region Change Role
                dashboardPage.ChangeRole(RolesInApplication.MainRegistrar);
                #endregion

                #region Create Case
                casePage.AddTitle(caseTitle1);
                casePage.SelectKendoDropdownAndAddValue("Record section", "Personalarkiv - FNR");
                casePage.SaveCase();
                #endregion

                #region Edit case and verify Disposal details
                casePage.EditCase();
                Assert.IsTrue(casePage.GetPreservationTime() == preservationTime10, string.Format("Preservation Time {0} is not updated in Case", preservationTime10));
                Assert.IsTrue(casePage.GetDisposalCode() == disposalCodeValue, string.Format("Disposal Code {0} is not updated in Case", disposalCodeValue));
                #endregion

                #region Add Registry Entry
                casePage.ClickCancelEditCaseTitleButton();
                registryPage.CreateRegistryEntry(RegistryEntryType.OutgoingType.GetStringValue());
                registryPage.AddRegTitle(registryEntryTitle);
                registryPage.AddRegToAddress("AA");
                registryPage.ClickSaveBttn();
                #endregion

                #region Edit Registry Entry And Verify Disposal
                registryPage.ClickEditButton();
                CommonMethods.PlayWait(4000);
                Assert.IsTrue(registryPage.GetPreservationTime() == preservationTime10, string.Format("Preservation Time {0} is not updated in Registry Entry", preservationTime10));
                Assert.IsTrue(registryPage.GetDisposalCode() == disposalCodeValue, string.Format("Disposal Code {0} is not updated in Registry Entry", disposalCodeValue));
                #endregion

                #region Logout from Application
                logoutPage.LogoutApplication();
                #endregion
            });
            #endregion

            #region ---- Systemadministrasjon Module ----
            Selenium_Run((driver) =>
            {
                #region Instanstiation
                var logoutPage = LogoutPage.Connect(driver);
                var adminPage  = AdminstratorPage.Connect(driver);
                #endregion

                #region Login to Admin Module
                FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue());
                #endregion

                #region Navigate to Arkivstruktur-->Ordningsverdi And Click Serach ordningsverdi as "221"
                adminPage.NavigateToMenuItem("Arkivstruktur", "Ordningsverdi", "Søk");
                CommonMethods.PlayWait(2000);
                adminPage.SetTextBoxValueInSearchPopup("Principles for order values", "EMNE", true);
                adminPage.SetTextBoxValueInSearchPopup("Order values", classificationCode);
                adminPage.ClickOnButton("Search");
                CommonMethods.PlayWait(5000);
                adminPage.ClickItemInGrid(classificationCode);
                #endregion

                #region Update Disposal Code & Preservation Time 10 yrs for the PA1
                CommonMethods.PlayWait(8000);
                driver.SendTextToTextBoxField(PreservationTimeLabel, preservationTime6);
                adminPage.SelectKendoDropdownAndAddValue(disposalCodeLabel, disposalCodeValue);
                adminPage.Save();
                #endregion

                #region Verify disposal code and preservation time 10 are updated
                Assert.IsTrue(adminPage.GetPreservationTime() == preservationTime6, string.Format("Preservation Time {0} is not updated in Admin Module", preservationTime6));
                Assert.IsTrue(adminPage.GetDisposalCode() == disposalCodeValue, string.Format("Disposal Code {0} is not updated in Admin Module", disposalCodeValue));
                #endregion
            });
            #endregion

            #region ---- Saksbehandling Module ----

            Selenium_Run((driver) =>
            {
                #region Instantiation
                var casePage      = CasePage.Connect(driver);
                var adminPage     = AdminstratorPage.Connect(driver);
                var registryPage  = RegistryEntryPage.Connect(driver);
                var dashboardPage = DashboardPage.Connect(driver);
                var logoutPage    = LogoutPage.Connect(driver);
                #endregion

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

                #region Change Role
                dashboardPage.ChangeRole(RolesInApplication.MainRegistrar);
                #endregion

                #region Create Case
                casePage.CreateCaseWithClassificationCode(caseTitle2, classificationCode);
                #endregion

                #region Edit case and verify Disposal details
                casePage.EditCase();
                Assert.IsTrue(casePage.GetPreservationTime() == preservationTime6, string.Format("Preservation Time {0} is not updated in Case", preservationTime6));
                Assert.IsTrue(casePage.GetDisposalCode() == disposalCodeValue, string.Format("Disposal Code {0} is not updated in Case", disposalCodeValue));
                #endregion

                #region Add Registry Entry
                casePage.ClickCancelEditCaseTitleButton();
                registryPage.CreateRegistryEntry(RegistryEntryType.OutgoingType.GetStringValue());
                registryPage.AddRegTitle(registryEntryTitle);
                registryPage.AddRegToAddress("AA");
                registryPage.ClickSaveBttn();
                #endregion

                #region Edit Registry Entry And Verify Disposal
                registryPage.ClickEditButton();
                CommonMethods.PlayWait(4000);
                Assert.IsTrue(registryPage.GetPreservationTime() == preservationTime6, string.Format("Preservation Time {0} is not updated in Registry Entry", preservationTime6));
                Assert.IsTrue(registryPage.GetDisposalCode() == disposalCodeValue, string.Format("Disposal Code {0} is not updated in Registry Entry", disposalCodeValue));
                #endregion

                #region Logout from Application
                logoutPage.LogoutApplication();
                #endregion
            });
            #endregion
        }
示例#4
0
        public void RecommendationProposalDecisionProtocolExtractLetterCaseParty()
        {
            // TC#77817
            // TC#74091
            // TC#75690

            #region ---- Variable Declaration ----

            #region Variables
            GlobalVariables.RoleType       = " Secretary of the Board - Eng ";
            GlobalVariables.MeetingTabName = "Documents";
            GlobalVariables.ProcessName    = "Kommunestyret";
            GlobalVariables.MeetingType    = "Kommunestyret";
            string proposerName     = "Jarle Trydal";
            string installingText   = "This is Installing Text";
            string oppsummeringText = "This is Oppsummering Text";
            string caseNumber       = string.Empty;
            string caseTitle        = string.Empty;
            string actualVal        = string.Empty;
            #endregion

            #region Date & Time
            var    time                                       = DateTime.Now; //12.02.2018 07:04:05   4:25 5:00
            var    secondTime                                 = time.AddHours(1).AddMinutes(23);
            var    secondTime2                                = time.AddHours(2).AddMinutes(52);
            var    secondTime3                                = time.AddHours(3).AddMinutes(52);
            var    secondTime4                                = time.AddHours(4).AddMinutes(52);
            var    firstTime                                  = time.AddMinutes(13);
            string meetingStartTimeAndDate                    = firstTime.ToString("dd.MM.yyyy HH:mm");
            string meetingEndTimeAndDate                      = secondTime.ToString("dd.MM.yyyy HH:mm");
            string meetingEndTimeAndDateForNoNumber           = secondTime2.ToString("dd.MM.yyyy HH:mm");
            string meetingEndTimeAndDateForJustThisMeeting    = secondTime3.ToString("dd.MM.yyyy HH:mm");
            string meetingEndTimeAndDateFromSubsequentMeeting = secondTime4.ToString("dd.MM.yyyy HH:mm");
            string myMeetingTiming                            = firstTime.ToString("HH.mm") + " - " + secondTime.ToString("HH.mm");
            string myMeetingTimingWithoutEndTime              = firstTime.ToString("HH.mm") + " - ";
            string myMeetingTimingForNoNumber                 = firstTime.ToString("HH.mm") + " - " + secondTime2.ToString("HH.mm");
            string myMeetingTimingJustThisMeeting             = firstTime.ToString("HH.mm") + " - " + secondTime3.ToString("HH.mm");
            string myMeetingTimingFromSubsequentMeeting       = firstTime.ToString("HH.mm") + " - " + secondTime4.ToString("HH.mm");
            string dateInSaksProtokoll                        = time.ToString("dd/yyyy");

            string dateofMonth = time.ToString("dd");
            switch (dateofMonth)
            {
            case "01":
                dateofMonth = 1.ToString();
                break;

            case "02":
                dateofMonth = 2.ToString();
                break;

            case "03":
                dateofMonth = 3.ToString();
                break;

            case "04":
                dateofMonth = 4.ToString();
                break;

            case "05":
                dateofMonth = 5.ToString();
                break;

            case "06":
                dateofMonth = 6.ToString();
                break;

            case "07":
                dateofMonth = 7.ToString();
                break;

            case "08":
                dateofMonth = 8.ToString();
                break;

            case "09":
                dateofMonth = 9.ToString();
                break;
            }

            string meetingStartTime = time.ToString("HH:mm"); //13:25
            //AdminCommon.Document.DocumentHelpers DocumentHelpers = new AdminCommon.Document.DocumentHelpers();
            string dayOfWeek = time.DayOfWeek.ToString();
            string day       = null;
            switch (dayOfWeek)
            {
            case "Monday":
                day = "mon";
                break;

            case "Tuesday":
                day = "tue";
                break;

            case "Wednesday":
                day = "wed";
                break;

            case "Thursday":
                day = "thu";
                break;

            case "Friday":
                day = "fri";
                break;

            case "Saturday":
                day = "sat";
                break;

            case "Sunday":
                day = "sun";
                break;
            }
            #endregion

            #endregion

            #region ---- Meeting Module ----
            Selenium_Run((driver) =>
            {
                #region Instantiation
                var dashboardPage = DashboardPage.Connect(driver);
                var logoutPage    = LogoutPage.Connect(driver);
                #endregion

                #region Login to Møtemodul
                FrontPage.LoginToApplication(driver, ApplicationModules.MeetingModule.GetStringValue());
                #endregion

                #region Change Role
                //Check if role secretary is selected. if yes, then no need to change role else change tole to secretary
                var meeting = MeetingPage.Connect(driver);
                if (meeting.GetRoleName().ToLowerInvariant() != RolesInApplication.SecretaryOfTheBoard.GetStringValue().ToLowerInvariant())
                {
                    dashboardPage.ChangeRole(RolesInApplication.SecretaryOfTheBoard);
                }
                #endregion

                #region Create New Meeting
                meeting.CreateNewMeeting(GlobalVariables.MeetingType, meetingEndTimeAndDate, meetingStartTimeAndDate);
                #endregion

                #region Logout from Application
                logoutPage.LogoutApplication();
                #endregion
            });

            #endregion

            #region ---- Saksbehandling Module ----
            Selenium_Run((driver) =>
            {
                #region Instanstiation
                var casePage      = CasePage.Connect(driver);
                var registryEntry = RegistryEntryPage.Connect(driver);
                var documentPage  = DocumentPage.Connect(driver);
                var meetingPage   = MeetingPage.Connect(driver);
                var logoutPage    = LogoutPage.Connect(driver);
                #endregion

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

                #region Add Case
                caseTitle = "Recommendation Summary Proposal Decision ProtocalExtract and Letter to case party";
                GlobalVariables.CaseTitle = caseTitle;
                casePage.CreateCase(GlobalVariables.CaseTitle);
                caseNumber = casePage.GetCaseNumber();
                #endregion

                #region Create Registry, Add Processing, Saksfralegg Doc, Add Instilling & Oppsummering, close document, mark as completed

                #region Create Registry entry CaseDraftType
                registryEntry.CreateRegistryEntry(RegistryEntryType.CaseDraftType.GetStringValue());
                GlobalVariables.RegistryEntryTitle = "Registry Entry - Case Draft for Meeting" + " " + CommonMethods.GetRandomNumber();
                registryEntry.AddRegTitle(GlobalVariables.RegistryEntryTitle);
                #endregion

                #region Add Processing name - Handling
                CommonMethods.PlayWait(4000);
                registryEntry.AddProcessing(GlobalVariables.ProcessName);
                #endregion

                #region Add SaksframleggDoc, Login to application, save and edit document
                documentPage.ClickAndAddDocTemplate(AttachmentType.DocumentTemplate.GetStringValue());
                documentPage.SelectDocument(DocumentTemplateType.Dokumentmal.GetStringValue(), DocumentSubType.Saksframlegg.GetStringValue());
                registryEntry.ClickSaveBttn();
                documentPage.HandleAlertPopupToOpenWordDocument();
                documentPage.DocumentWebLoginWindow();
                GlobalVariables.EditDataStatement = "Draft Creation for new meeting";
                documentPage.EditAndSaveWordDocument(GlobalVariables.EditDataStatement);
                #endregion

                #region Edit Document - Add Instilling & Oppsummering

                CommonMethods.PlayWait(5000);

                #region Enter Installing Text
                meetingPage.AddInstillingTextToSaksframlegg(installingText);
                #endregion

                CommonMethods.PlayWait(5000);

                #region Enter Oppsummering Text
                meetingPage.AddOppsummeringTextToSaksframlegg(oppsummeringText);
                #endregion

                #endregion

                #region Save and close document
                documentPage.SaveWordDocument();
                documentPage.CloseDocument();
                CommonMethods.PlayWait(9000);
                #endregion

                //Mark as complete
                #region Change registry entry status to F/done
                registryEntry.ClickEditButton();
                registryEntry.ChangeREStatusToFerdigOrDone();
                registryEntry.ClickSaveBttn();
                #endregion
                #endregion

                #region Logout from Application
                CommonMethods.PlayWait(4000);
                logoutPage.LogoutApplication();
                #endregion
            });
            #endregion

            #region ---- Login to Admin Module for 2nd Time and Select 'Reuse existing numbers from this and subsequent meetings ----
            Selenium_Run((driver) =>
            {
                #region Instanstiation
                var casePage      = CasePage.Connect(driver);
                var dashboardPage = DashboardPage.Connect(driver);
                var registryEntry = RegistryEntryPage.Connect(driver);
                var documentPage  = DocumentPage.Connect(driver);
                var meetingPage   = MeetingPage.Connect(driver);
                var logoutPage    = LogoutPage.Connect(driver);
                var adminPage     = AdminstratorPage.Connect(driver);
                #endregion

                #region Login to Admin Module
                FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue());
                #endregion

                #region Change Role to Secretary of Boards - Eng
                CommonMethods.PlayWait(2000);
                dashboardPage.ChangeRole(RolesInApplication.SecretaryOfTheBoard);
                #endregion

                #region Navigate to alle, Select Numbering option and save
                adminPage.NavigateToMenuItem("Utvalgsbehandling", "Styre, råd og utvalg", "Styre, råd og utvalg (alle)");
                CommonMethods.PlayWait(2000);
                adminPage.ClickItemInGrid(GlobalVariables.MeetingType);
                CommonMethods.PlayWait(2000);
                meetingPage.SelectListValueAndSelectByText(MeetingPage.MeetingPageLocators.NumberingSchemeDropdown, "Reuse existing numbers from just this meeting");
                adminPage.Save();
                CommonMethods.PlayWait(4000);
                meetingPage.SelectListValueAndSelectByText(MeetingPage.MeetingPageLocators.NumberingSchemeDropdown, "Only new numbers from the DMB number series");
                adminPage.Save();
                #endregion

                #region Logout from Application
                logoutPage.LogoutApplication();
                #endregion
            });

            #endregion

            #region ---- Meeting Module ----

            Selenium_Run((driver) =>
            {
                #region Instantiation
                var meeting       = MeetingPage.Connect(driver);
                var dashboardPage = DashboardPage.Connect(driver);
                var documentPage  = DocumentPage.Connect(driver);
                var reportPage    = ReportPage.Connect(driver);
                var logoutPage    = LogoutPage.Connect(driver);
                #endregion

                #region Login to Møtemodul
                FrontPage.LoginToApplication(driver, ApplicationModules.MeetingModule.GetStringValue());
                #endregion

                #region Select My Meeting and Finish Meeting process in progress bar

                #region Change Role
                //Check if role secretary is selected. if yes, then no need to change role else change tole to secretary

                if (meeting.GetRoleName().ToLowerInvariant() != RolesInApplication.SecretaryOfTheBoard.GetStringValue().ToLowerInvariant())
                {
                    dashboardPage.ChangeRole(RolesInApplication.SecretaryOfTheBoard);
                }
                #endregion

                #region Filter for Kommunestyret
                meeting.FilterAndRemovetMeetingsInDashboard(MeetingTypes.Formannskapet.GetStringValue());
                #endregion

                #region Find My Meeting and Drag from Queue to Case List and click save
                CommonMethods.PlayWait(4000);
                meeting.CalenderDate(day, dateofMonth);
                CommonMethods.PlayWait(2000);
                meeting.SelectMyMeeting(myMeetingTiming, day, dateofMonth);
                CommonMethods.PlayWait(10000);
                meeting.SearchAndDragRegistryEntry(GlobalVariables.RegistryEntryTitle);
                CommonMethods.PlayWait(5000);
                meeting.ClickSaveInCasePlan();

                #region Getting Number from Case Draft
                // Trimming string to Generate Assigned Number to Case Draft
                string assignedNumber1        = meeting.ReturnNumberAssignedToCaseDraft(GlobalVariables.RegistryEntryTitle);                                                              // "1 PS 268/18 Registry Entr"
                string TrimmedAssignedNumber1 = assignedNumber1.Trim(new char[] { ' ', 'P', 'S', 'R', 'e', 'g', 'i', 's', 'E', 't', 'r', '-', 'n', 'y', 'C', 'a', 'D', 'f', 'o', 'M', }); // "1 PS 268/18"
                char[] myChar1 = { 'S', 'P', ' ' };
                string actualAssignedNumber1 = TrimmedAssignedNumber1.TrimStart(myChar1);                                                                                                 // "268/18"
                string names1   = actualAssignedNumber1;                                                                                                                                  // "268/18"
                int index1      = names1.IndexOf("/");                                                                                                                                    // 3
                string element1 = names1.Replace("Type", "").Replace("PS", "").Replace("No", "").Replace(".", "").Trim();                                                                 // "268/2018"
                string Test     = names1.Insert(index1 + "/".Length, "20").ToUpper();                                                                                                     // 268/2018
                var newstring   = Test.Replace("Type".ToUpperInvariant(), "").Replace("PS".ToUpperInvariant(), "").Replace("No".ToUpperInvariant(), "").Replace(".", "").Trim();
                actualVal       = newstring.Insert(0, "sak");                                                                                                                             // "sak268/2018"

                #endregion

                #endregion

                #region Click Create Agenda, Click Start Icon from Progress Bar and start button Case Draft, Add Proposal, Decision and  Save Meeting

                #region Click on Create Agenda
                CommonMethods.PlayWait(4000);
                meeting.ClickCreateAgenda();
                CommonMethods.PlayWait(4000);
                meeting.HandleErrorPopUpAndThrowErrorMessage();
                CommonMethods.PlayWait(8000);

                #endregion

                #region Start Meeting
                //Click Start Meeting
                meeting.ClickStartButton();
                CommonMethods.PlayWait(5000);
                #endregion

                #region Steps to Finish Meeting
                //Click Start Handling
                CommonMethods.PlayWait(5000);
                CommonMethods.RefreshBrowserWindow(driver);
                CommonMethods.PlayWait(10000);
                meeting.ClickStartHandlingButton();
                CommonMethods.PlayWait(5000);

                #region Add Proposal (Suggestion) and Decision (Vedtak)
                meeting.AddNewSuggestion(proposerName);

                // Add Decision
                meeting.AddBehandling();

                #endregion

                //Click Save Handling in Case Draft
                CommonMethods.PlayWait(5000);
                meeting.ClickSaveHandlingButton();

                //Verify Text -> Finished in left pane
                CommonMethods.PlayWait(8000);
                meeting.VerifyFinishedTextIsVisible();
                #endregion

                #endregion

                #endregion

                #region Click Documents in Meeting Module and verify (Motedokumenter, Saksprotokoller, Saksdokumenter)
                meeting.ClickTabElement(MeetingTabControl.Documents.GetStringValue());

                // Verify Meeting Documents or Motedokumenter
                meeting.ClickAndVerifyMeetingDocuments(MeetingListTabValues.MeetingDocuments.GetStringValue(), false);

                // verify Saksprotokoller
                meeting.ClickAndVerifyMeetingDocuments(MeetingListTabValues.Caseprotocols.GetStringValue(), false);

                // verify Saksdokumenter
                meeting.ClickAndVerifyMeetingDocuments(MeetingListTabValues.Casedocuments.GetStringValue(), false);
                #endregion

                #region Click and Validate Case Protocol or Saksprotokoller

                //Open case protocol
                meeting.ClickAndVerifyMeetingDocuments(MeetingListTabValues.Caseprotocols.GetStringValue());
                meeting.ClickCaseProtocolDocuments(GlobalVariables.RegistryEntryTitle);
                CommonMethods.PlayWait(3000);
                meeting.OpenInDesktopApplication();
                documentPage.HandleAlertPopupToOpenWordDocument();
                documentPage.DocumentWebLoginWindow();
                CommonMethods.PlayWait(10000);
                documentPage.CopyContentsOfOpenedWordDoc();
                string validate = Clipboard.GetText();

                #region Case Protocol Validation

                StringAssert.Contains(validate, GlobalVariables.NewSuggestion, "The new suggestion Text is not available in the case protocol document");
                StringAssert.Contains(validate, GlobalVariables.Decision, "The Decision Text is not available in the case protocol document");
                StringAssert.Contains(validate, proposerName, "The proposer name is not available in the case protocol document");
                StringAssert.Contains(validate, installingText, "The Instilling (Bookmark Recommendation) Text is not available in the case protocol document");
                StringAssert.Contains(validate, oppsummeringText, "The Oppsummering (Bookmark Summary)  is not available in the case protocol document");
                StringAssert.Contains(validate, actualVal, "The number assigned to Case Draft  is not available in the case protocol document");

                //close document
                documentPage.CloseDocument();
                #endregion

                #endregion

                #region Below code is commented. Can be used in other TCs. ---- OpenInDesktopApplication

                #region Click and Validate Meeting Protocol or Moteprotokoll OpenInDesktopApplication

                meeting.ClickAndVerifyMeetingDocuments(MeetingDocListValues.MeetingProtocol.GetStringValue());//Moteprotokoll
                //CommonMethods.PlayWait(3000);
                //meeting.OpenInDesktopApplication();
                //documentPage.HandleAlertPopupToOpenWordDocument();
                //documentPage.DocumentWebLoginWindow();
                //CommonMethods.PlayWait(5000);

                //#region Validate PDF file is real
                //meeting.VerifyPDFfile();
                //#endregion

                //meeting.SearchAndVerifyInstillingAndOppsummeringTextInPDF(installingText, oppsummeringText);
                //meeting.CopyContentFromPDFFile();

                //string PdfReader = Clipboard.GetText();
                ////Validating Text in PDF
                //CommonMethods.PlayWait(10000);
                //StringAssert.Contains(PdfReader, element1, "PS number assigned to Case Draft in Meeting Protocol is not available ");
                //StringAssert.Contains(PdfReader, actualVal, "PS number assigned to Case Draft in Meeting Protocol is not available ");
                //StringAssert.Contains(PdfReader, GlobalVariables.NewSuggestion, "The new suggestion Text is not available in the Meeting protocol document");
                //StringAssert.Contains(PdfReader, GlobalVariables.Decision, "The Decision Text is not available in the Meeting protocol document");

                ////Close PDF document
                //documentPage.ClosePDF();
                #endregion

                #endregion

                #region Click and Validate Meeting Protocol or Moteprotokoll open in office online - Handle Bug 199932
                CommonMethods.PlayWait(3000);
                meeting.OpenInOfficeOnline();
                documentPage.HandleAlertPopupToOpenWordDocument();
                documentPage.DocumentWebLoginWindow();
                CommonMethods.PlayWait(10000);
                meeting.VerifyPDFOpenedInOfficeOnline();
                #endregion

                #region Finish Meeting, Click After button is activated

                meeting.ClickTabElement(MeetingTabControl.CaseList.GetStringValue());

                //Click Finished
                CommonMethods.PlayWait(5000);
                meeting.ClickFinishedButton();

                //Click After
                CommonMethods.PlayWait(2000);
                meeting.ClickAfterButton();

                CommonMethods.PlayWait(4000);

                #endregion

                #region Protokollering grid (Left hand side):
                CommonMethods.PlayWait(1000);
                CommonMethods.RefreshBrowserWindow(driver);
                CommonMethods.PlayWait(10000);
                // Select record and from quick menu select "Protokollutdrag" option
                meeting.OpenProtocolAgendaItemInRecordManagementModule();
                CommonMethods.PlayWait(4000);
                //Close browser window
                reportPage.CloseCurrentBrowserTab();
                #endregion

                #region Logout from Application
                logoutPage.LogoutApplication();
                #endregion
            });

            #endregion

            #region ---- Saksbehandling Module ----

            Selenium_Run((driver) =>
            {
                #region Instantiation
                var casePage      = CasePage.Connect(driver);
                var registryPage  = RegistryEntryPage.Connect(driver);
                var meeting       = MeetingPage.Connect(driver);
                var dashboardPage = DashboardPage.Connect(driver);
                var documentPage  = DocumentPage.Connect(driver);
                var reportPage    = ReportPage.Connect(driver);
                var logoutPage    = LogoutPage.Connect(driver);
                #endregion

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

                #region Search for Case and Open Case
                casePage.QuickSearchCaseId(caseNumber);
                CommonMethods.PlayWait(3000);
                #endregion

                #region Validate X (Internt notat uten oppfølging/internal) type registry entry

                casePage.ClickOnButton("Registry entries");
                registryPage.ClickRegistryByType("Internt notat uten oppfølging/internal", false);

                // Open Document
                registryPage.ClickAttachmentOption("Summary Registry Entry - Case Draft", "Open");

                #region Validate X Type Doc Content
                documentPage.HandleAlertPopupToOpenWordDocument();
                documentPage.DocumentWebLoginWindow();
                CommonMethods.PlayWait(10000);
                documentPage.CopyContentsOfOpenedWordDoc();
                string validateXTypeDocContent = Clipboard.GetText();
                StringAssert.Contains(validateXTypeDocContent, GlobalVariables.NewSuggestion, "The new suggestion Text is not available in the X Type document");
                StringAssert.Contains(validateXTypeDocContent, GlobalVariables.Decision, "The Decision Text is not available in the X Type document");
                StringAssert.Contains(validateXTypeDocContent, proposerName, "The proposer name is not available in the X Type document");
                StringAssert.Contains(validateXTypeDocContent, installingText, "The Instilling (Bookmark Recommendation) Text is not available in the X Type document");
                StringAssert.Contains(validateXTypeDocContent, oppsummeringText, "The Oppsummering (Bookmark Summary)  is not available in the X Type document");

                //close document
                documentPage.CloseDocument();
                #endregion

                #endregion

                #region Create 3 Case Parties in RE

                #region Add Case Parties -> Case Party 1 with AA
                casePage.AddParties("Shortname", "AA");
                #endregion

                #region Add Case Parties -> Case Party 2 with AB
                casePage.AddParties("Shortname", "AB");
                #endregion

                #region Add Case Parties -> Case Party 3 with SV
                casePage.AddParties("Shortname", "SV");
                #endregion

                CommonMethods.PlayWait(3000);

                #endregion

                #region Go back to Registry Entry
                casePage.ClickOnButton("Registry entries");
                CommonMethods.PlayWait(3000);
                registryPage.ClickRegistryByType("Saksframlegg/Case draft");
                CommonMethods.PlayWait(3000);
                #endregion

                #region Click on RE menu item and choose Create party letter (Include decision) and Validate

                // Click on choose Create party letter (Include decision)
                registryPage.RegistryEntryViewMenu("Create party letter (Include decision)");

                #region Validate choose Create party letter (Include decision)
                CommonMethods.PlayWait(5000);

                // Valiate U Type RE
                registryPage.ValidateUTypeRE("Utgående post/Outbound");

                // Same RE Title
                registryPage.ValidateRETitle(GlobalVariables.RegistryEntryTitle);

                // Validate Case Parties
                registryPage.ValidateCasePartiesInRE("Anda Apotek");
                registryPage.ValidateCasePartiesInRE("Aktiebolaget Bolinda");
                registryPage.ValidateCasePartiesInRE("Sosialistisk Venstreparti");

                #endregion


                // add document
                documentPage.ClickAndAddDocTemplate(AttachmentType.DocumentTemplate.GetStringValue());
                documentPage.SelectDocument(DocumentTemplateType.Dokumentmal.GetStringValue(), DocumentSubType.Standardbrev.GetStringValue());
                registryPage.ClickSaveBttn();
                CommonMethods.PlayWait(5000);
                registryPage.ClickAttachmentOption("Standard brev", "Open");
                documentPage.HandleAlertPopupToOpenWordDocument();
                documentPage.DocumentWebLoginWindow("guilt");
                CommonMethods.PlayWait(8000);
                AutoItX.Send("{LEFT}");
                AutoItX.Send("{ENTER}");
                CommonMethods.PlayWait(3000);

                #region Validate Decision, Proposer, Proposal, Instilling and Oppsummering in Include Decision
                documentPage.CopyContentsOfOpenedWordDoc();
                string validateForIncludeDecision = Clipboard.GetText();
                CommonMethods.PlayWait(2000);
                StringAssert.Contains(validateForIncludeDecision, GlobalVariables.NewSuggestion, "The new suggestion Text is not available in the Include decision document");
                StringAssert.Contains(validateForIncludeDecision, GlobalVariables.Decision, "The Decision Text is not available in the Include decision document");
                StringAssert.Contains(validateForIncludeDecision, proposerName, "The proposer name is not available in the Include decision document");
                StringAssert.Contains(validateForIncludeDecision, installingText, "The Instilling (Bookmark Recommendation) Text is not available in the Include decision document");
                StringAssert.Contains(validateForIncludeDecision, oppsummeringText, "The Oppsummering (Bookmark Summary)  is not available in the Include decision document");
                StringAssert.Contains(validateForIncludeDecision, actualVal, "The case draft value assigned in meeting module  is not available in the Include decision document");

                //close document
                documentPage.CloseDocument();
                #endregion

                CommonMethods.PlayWait(5000);

                #endregion

                #region Click Case Draft

                CommonMethods.PlayWait(3000);
                // Select Create party letter (Include complete procedure) from Menu Item
                casePage.ClickOnButton("Registry entries");
                CommonMethods.PlayWait(3000);
                registryPage.ClickRegistryByType("Saksframlegg/Case draft");
                CommonMethods.PlayWait(3000);
                #endregion

                #region Click on RE menu item and choose Create party letter (Include complete procedure) and Validate

                // Click on choose Create party letter (Include decision)
                registryPage.RegistryEntryViewMenu("Create party letter (Include complete procedure)");

                #region Validate "Create party letter (Include complete procedure)"

                // Valiate U Type RE
                registryPage.ValidateUTypeRE("Utgående post/Outbound");

                // validate Same RE Title
                registryPage.ValidateRETitle(GlobalVariables.RegistryEntryTitle);

                // Validate Case Parties
                registryPage.ValidateCasePartiesInRE("Anda Apotek");
                registryPage.ValidateCasePartiesInRE("Aktiebolaget Bolinda");
                registryPage.ValidateCasePartiesInRE("Sosialistisk Venstreparti");

                #endregion

                // add document
                documentPage.ClickAndAddDocTemplate(AttachmentType.DocumentTemplate.GetStringValue());
                documentPage.SelectDocument(DocumentTemplateType.Dokumentmal.GetStringValue(), DocumentSubType.BrevDocument.GetStringValue());
                registryPage.ClickSaveBttn();

                registryPage.ClickAttachmentOption("Brev - Word", "Open");
                documentPage.HandleAlertPopupToOpenWordDocument();
                documentPage.DocumentWebLoginWindow("guilt");
                CommonMethods.PlayWait(8000);
                AutoItX.Send("{LEFT}");
                AutoItX.Send("{ENTER}");
                CommonMethods.PlayWait(3000);

                #region Validate Decision, Proposer, Proposal, Instilling and Oppsummering in Include Complete Procedure
                documentPage.CopyContentsOfOpenedWordDoc();
                string validateForIncludeCompleteProcedure = Clipboard.GetText();
                CommonMethods.PlayWait(2000);
                StringAssert.Contains(validateForIncludeCompleteProcedure, GlobalVariables.NewSuggestion, "The new suggestion Text is not available in the Include Complete Procedure document");
                StringAssert.Contains(validateForIncludeCompleteProcedure, GlobalVariables.Decision, "The Decision Text is not available in the Include Complete Procedure document");
                StringAssert.Contains(validateForIncludeCompleteProcedure, proposerName, "The proposer name is not available in the Include Complete Procedure document");
                StringAssert.Contains(validateForIncludeCompleteProcedure, installingText, "The Instilling (Bookmark Recommendation) Text is not available in the Include Complete Procedure document");
                StringAssert.Contains(validateForIncludeCompleteProcedure, oppsummeringText, "The Oppsummering (Bookmark Summary)  is not available in the Include Complete Procedure document");

                CommonMethods.PlayWait(5000);
                // close document
                documentPage.CloseDocument();
                #endregion

                CommonMethods.PlayWait(5000);
                #endregion

                #region Logout from Application
                logoutPage.LogoutApplication();
                #endregion
            });
            #endregion
        }
        public void InheritDisposalCodeFromRegToDocument()
        {
            #region Variables
            string PreservationTimeLabel = "Preservation time";
            string preservationTime10    = "10";
            string dropdownValue         = "Kasseres";
            string caseTitle             = "NewCase";
            string registryEntryTitle    = "RegEntry";
            #endregion

            /*
             *
             #region Systemadministrasjon Module
             *          Selenium_Run((driver) =>
             *          {
             #region Instanstiation
             *              var logoutPage = LogoutPage.Connect(driver);
             *              var adminPage = AdminstratorPage.Connect(driver);
             #endregion
             *
             #region Login to Admin Module
             *              FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue());
             #endregion
             *
             #region Navigate to Dokumentkategori
             *              AdminstratorPage _adminPage = AdminstratorPage.Connect(driver);
             *              _adminPage.NavigateToMenuItem("Elektronisk arkiv", "Dokumentkategori", "Dokumentkategori (alle)");
             *            //  _adminPage.ClickOnItemInGrid("RT Automatic Test 1");
             #endregion
             *
             #region Update Disposal Code & Preservation Time 10 yrs for the RT1
             *              CommonMethods.PlayWait(3000);
             *              adminPage.SelectHtmlComboBox("Disposal code", "K");
             *              driver.SendTextToTextBoxField(PreservationTimeLabel, preservationTime10);
             *              adminPage.Save();
             #endregion
             *
             #region Logout from Admin Module
             *              LogoutPage logout = LogoutPage.Connect(driver);
             *              logout.LogoutApplication();
             #endregion
             *          });
             #endregion
             */
            #region   Arkivansvarlig Module
            Selenium_Run((driver) =>
            {
                #region Instantiation
                var casePage      = CasePage.Connect(driver);
                var adminPage     = AdminstratorPage.Connect(driver);
                var registryPage  = RegistryEntryPage.Connect(driver);
                var dashboardPage = DashboardPage.Connect(driver);
                var logoutPage    = LogoutPage.Connect(driver);
                #endregion

                #region Login to Arkivansvarlig
                FrontPage.LoginToApplication(driver);
                #endregion
                try
                {
                    #region Change Role
                    dashboardPage.ChangeRole(RolesInApplication.MainRegistrar);
                    #endregion

                    #region Create Case
                    casePage.AddTitle(caseTitle);
                    casePage.SaveCase();
                    #endregion

                    #region Add Registry Entry
                    registryPage.CreateRegistryEntry(RegistryEntryType.OutgoingType.GetStringValue());
                    registryPage.AddRegTitle(registryEntryTitle);
                    registryPage.AddRegToAddress("AA");
                    registryPage.SelectKendoDropdownAndAddValue("Document category", "RT");
                    #endregion

                    #region attach document
                    DocumentPage document = DocumentPage.Connect(driver);
                    document.ClickAndAddDocTemplate(AttachmentType.DocumentTemplate.GetStringValue());
                    document.SelectDocument(DocumentTemplateType.Dokumentmal.GetStringValue(), DocumentSubType.Standardbrev.GetStringValue());
                    document.SaveAndEdit();
                    document.HandleAlertPopupToOpenWordDocument();
                    document.DocumentWebLoginWindow();
                    document.CloseDocument();
                    #endregion

                    #region Edit Registry Entry And Verify Disposal
                    registryPage.ClickEditButton();
                    CommonMethods.PlayWait(4000);
                    registryPage.ClickMoreArrow();
                    //Assert.IsTrue(registryPage.GetDisposalCode() == dropdownValue, string.Format("Disposal Code {0} is not updated in Registry Entry", dropdownValue));
                    //Assert.IsTrue(registryPage.GetPreservationTime() == preservationTime10, string.Format("Preservation Time {0} is not updated in Registry Entry", preservationTime10));
                    #endregion


                    #region Verify Document Details And Verify Disposal
                    document.ViewAttachmentInformation("Document details");
                    document.VerifyDropdownValue("Document category", "RT - Automatic Test 1");
                    //  registryPage.VerifyDocumentDetails("Document details");
                    Assert.IsTrue(registryPage.GetDisposalCode() == dropdownValue, string.Format("Disposal Code {0} is not updated in Registry Entry", dropdownValue));
                    Assert.IsTrue(registryPage.GetPreservationTime() == preservationTime10, string.Format("Preservation Time {0} is not updated in Registry Entry", preservationTime10));
                    #endregion
                }
                catch (System.Exception)
                {
                }
                #region Logout from Application
                logoutPage.LogoutApplication();
                #endregion
            });
            #endregion
        }