public void AddEditDeleteLogging() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Logging and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("SGK-funksjoner", "Logging", "Logging (alle)"); adminPage.ClickOnButton("New"); adminPage.SelectHtmlComboBox("Table name", "ADMINDEL"); adminPage.SetTextBox("Text", "Automation Testing"); adminPage.SetTextBox("Being kept", "10"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.EditDescription("ADMINDEL", "Text", "Edit_Automation Testing", Description.TextBox, false); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteVarslingsform() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Varslingsform and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("SGK-funksjoner", "Varslingsform", "Varslingsform (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Code", "GDR"); adminPage.SetTextBox("Notification type", "Automation Testing"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.VerifyDesctiptionIsExist("GDR"); adminPage.EditDescription("Automation Testing", "Notification type", "Edit_Automation Testing", Description.TextBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteArbeidsflytmaler() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Change Role to Secretary of Boards - Eng DashboardPage dashboardPage = DashboardPage.Connect(driver); CommonMethods.PlayWait(2000); dashboardPage.ChangeRole(RolesInApplication.MainRegistrar); #endregion #region Navigate to Maler (alle) and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("SGK-funksjoner", "Arbeidsflytmaler", "Maler (alle)"); adminPage.ClickOnButton("New"); adminPage.SelectHtmlComboBox("Object type", "Case workflow"); adminPage.SetTextBox("Title", "Automation Testing"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.VerifyDesctiptionIsExist("Automation Testing"); adminPage.EditDescription("Automation Testing", "Title", "Edit_Automation Testing", Description.TextBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteTilleggsattributter() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Tilleggsattributter and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("SGK-funksjoner", "Tilleggsattributter", "Tilleggsattributter (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Code", "AT"); adminPage.SetTextBox("No.", "10"); adminPage.SetTextBox("Description", "Automation Testing"); adminPage.SetTextBox("Caption", "Tilleggsattributter Captions "); adminPage.SelectHtmlComboBox("Field type", "Text box"); adminPage.SelectHtmlComboBox("Type", "Note"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.EditDescription("AT", "Description", "Edit_Automation Testing", Description.TextBox, false); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteVedtakstype() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Vedtakstyper and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Vedtaksoppfølging", "Vedtakstype", "Vedtakstyper(alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Decision code", "AT"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.VerifyDesctiptionIsExist("AT"); adminPage.EditDescription("AT", "Description", "Automation Testing", Description.TextBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteImportsentraler() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Importsentraler and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("SGK-funksjoner", "Importsentral", "Importsentraler (alle)"); adminPage.ClickOnButton("New"); adminPage.SelectHtmlComboBox("Type", "IMAP"); adminPage.SetTextBox("Description", "Automation Testing"); adminPage.SelectHtmlComboBox("Person", "EPHORTE"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.EditDescription("Automation Testing", "Description", "Edit_Automation Testing", Description.TextBox, false); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteGebyrtyper() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion var time = DateTime.Now; //12.02.2020 07:04:05 4:25 5:00 string fromDate = time.ToString("dd.MM.yyyy"); #region Navigate to Vedtakstyper and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Byggesak", "Gebyrtyper", "Gebyrtyper (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Description", "Automation_Testing"); adminPage.SetTextBox("Cost", "1000"); adminPage.SetTextBox("From date", fromDate); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.EditDescription("Automation_Testing", "Description", "Edit_Automation Testing", Description.TextBox, false); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteLovForskrift() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Lov/forskrift - presendes and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Arkivstyring", "Lov/forskrift - presendes", "Lov/forskrift (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Shortname", "AT"); adminPage.SetTextBox("Law/requirements", "Automation Testing"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.VerifyDesctiptionIsExist("AT"); adminPage.EditDescription("AT", "Law/requirements", "Edit_Automation Testing", Description.TextBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteStoppord() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Stoppord and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Arkivstyring", "Stoppord stikkordsindeksering", "Stoppord (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Word", "AutomationTesting"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.EditDescription("AutomationTesting", "Word", "EditAutomationTesting", Description.TextBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteStillingsstatus() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Vedtakstyper and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Ansettelsessak", "Stillingsstatus", "Stillingsstatus (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Position status", "11"); adminPage.SetTextBox("Description", "Automation_Testing"); adminPage.Save(); adminPage.VerifyDesctiptionIsExist("11"); adminPage.EditDescription("11", "Description", "Edit_Automation Testing", Description.TextBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteAvskrivingsmate() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Avskrivingsmåte and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Arkivstyring"); adminPage.NavigateToMenuItem("Avskrivingsmåte", "Avskrivingsmåte"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Mode of depreciation", "GDR"); adminPage.SetTextBox("Description", "Automation Testing"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.VerifyDesctiptionIsExist("GDR"); adminPage.EditDescription("GDR", "Description", "Edit_Automation Testing", Description.TextBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteKunngjoringsmater() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Kunngjøringsmåter and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Ansettelsessak", "Kunngjøringsmåter", "Kunngjøringsmåter (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Announcement method", "AT"); adminPage.SetTextBox("Description", "Automation Testing"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.VerifyDesctiptionIsExist("AT"); adminPage.EditDescription("AT", "Description", "Edit Automation Testing", Description.TextBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteStandardverdier() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Standardverdier and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Administrativ inndeling", "Standardverdier", "Standardverdier (alle)"); adminPage.ClickOnButton("New"); adminPage.SelectKendoDropdownAndAddValue("Adm. Unit", "English Department"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.VerifyDesctiptionIsExist("English Department"); adminPage.EditDescription("English Department", "Delimiter adm. unit", "Comma", Description.DropdownHTMLComboBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteRoll() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Rolle and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Brukeradministrasjon/tilgangsstyring", "Rolle", "Rolle (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Rolename", "AT"); adminPage.SetTextBox("Description", "Automation Testing"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.EditDescription("AT", "Description", "Edit Automation Testing", Description.TextBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteReguleringsformal() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Reguleringsformål and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Plansak", "Reguleringsformål", "Reguleringsformål (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Code", "10"); adminPage.SetTextBox("Description", "Automation Testing"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.VerifyAccessCodeExist("10"); adminPage.EditDescription("10", "Description", "Edit_Automation Testing", Description.TextBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteSkjematyper() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Fraser and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("SGK-funksjoner", "Skjematyper", "Skjematyper (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Schema name", "Name 1000"); adminPage.SetTextBox("Description", "Automation Testing"); adminPage.SetTextBox("Schema template", "Automation Schema template"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.VerifyDesctiptionIsExist("Automation Testing"); adminPage.EditDescription("Automation Testing", "Description", "Edit_Automation Testing", Description.TextBox, false); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteBehandlingsStatus() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Behandlingsstatus and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Utvalgsbehandling", "Behandlingsstatus", "Behandlingsstatus (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Status", "GD"); adminPage.SetTextBox("Description", "Automation Testing"); adminPage.SetTextBox("Sort order", "1"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.VerifyDesctiptionIsExist("GD"); adminPage.EditDescription("GD", "Description", "Edit_Automation Testing", Description.TextBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteArkivdeler() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Arkivdeler and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Arkivstruktur", "Arkivdeler", "Arkivdeler (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Record section", "AT"); adminPage.SetTextBox("Description", "Automation Testing"); adminPage.SelectHtmlComboBox("Registry office", "Edit Automation Testing"); adminPage.SelectHtmlComboBox("Primary organizing principle", "K-Kode fagklasse/fellesklasse bokmål"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.EditDescription("AT", "Description", "Edit_Automation Testing", Description.TextBox, false); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteStyreRadogutvalg() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Change Role to Secretary of Boards - Eng DashboardPage dashboardPage = DashboardPage.Connect(driver); CommonMethods.PlayWait(2000); dashboardPage.ChangeRole(RolesInApplication.SecretaryOfTheBoard); #endregion #region Navigate to Styre, råd og utvalg and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Utvalgsbehandling", "Styre, råd og utvalg", "Styre, råd og utvalg (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Board name", "Automation Testing"); adminPage.SetTextBox("Board meetingcode", "AT"); adminPage.SelectHtmlComboBox("Adm.unit", "Adm.enhet B2"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.VerifyDesctiptionIsExist("AT"); adminPage.EditDescription("AT", "Board name", "Edit_Automation Testing", Description.TextBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteTypeordningsprinsipp() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Bortsettingskoder and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Arkivstruktur"); adminPage.NavigateToMenuItem("Type ordningsprinsipp", "Type ordningsprinsipp"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Type order principles", "AT"); adminPage.SetTextBox("Description", "Automation_Testing"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.VerifyDesctiptionIsExist("AT"); adminPage.EditDescription("AT", "Description", "Edit_Automation Testing", Description.TextBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteOrdningsprinsipp() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Vedtakstyper and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Arkivstruktur", "Ordningsprinsipp", "Ordningsprinsipp (Alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Principles for order values", "AT"); adminPage.SetTextBox("Caption", "OrdiningsCaption"); adminPage.SetTextBox("Description", "Automation Testing"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.EditDescription("AT", "Description", "Edit_Automation Testing", Description.TextBox, false); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteJournalenhet() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Journalenhet and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Arkivstruktur", "Journalenhet", "Journalenhet (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Registry management unit", "AT"); adminPage.SetTextBox("Description", "Automation Testing"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.EditDescription("AT", "Description", "Edit_Automation Testing", Description.TextBox, false); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
public void AddEditDeleteDokumenttilknytning() { Selenium_Run((driver) => { #region Login to Admin Module FrontPage.LoginToApplication(driver, ApplicationModules.Administrator.GetStringValue()); #endregion #region Navigate to Dokumenttilknytning and add, save and delete AdminstratorPage adminPage = AdminstratorPage.Connect(driver); adminPage.NavigateToMenuItem("Elektronisk arkiv", "Dokumenttilknytning", "Dokumenttilknytning (alle)"); adminPage.ClickOnButton("New"); adminPage.SetTextBox("Linking code", "GD"); adminPage.SetTextBox("Description", "Automation Testing"); adminPage.Save(); driver.HandleErrorPopUpAndThrowErrorMessage(); adminPage.VerifyDesctiptionIsExist("GD"); adminPage.EditDescription("GD", "Description", "Edit_Automation Testing", Description.TextBox); adminPage.ClickDeleteAndConfirmDelete(); #region Logout from Admin Module LogoutPage logoutPage = LogoutPage.Connect(driver); logoutPage.LogoutApplication(); #endregion #endregion }); }
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 CreateCase() { Selenium_Run((driver) => { #region logon into Elements FrontPage.LoginToApplication(driver); #endregion #region Create new Case with Title CasePage casePage = new CasePage(driver); casePage.CreateCase("Smoke Test - Create new case"); #endregion #region Logout from Application LogoutPage logoutPage = new LogoutPage(driver); logoutPage.LogoutApplication(); #endregion }); }
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 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 }
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 }
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 }