public void ATC5505_CRMClientUpdatePhoneNumbers()
        {
            //Login in as role
            User user = this.environment.GetUser(SecurityRole.GeneralStaff);
            new LoginDialog().Login(user.Id, user.Password);
            string clientName = "CLIENT PHONE" + UICommon.GetRandomString(3);

            HomePage homePage = new HomePage(driver);
            string HomeWindow = driver.CurrentWindowHandle;
            homePage.HoverCRMRibbonTab();
            homePage.ClickClientServicesRibbonButton();
            homePage.HoverClientServicesRibbonTab();
            homePage.ClickClientsRibbonButton();

            ClientsSearchPage clientsSearchPage = new ClientsSearchPage(driver);
            clientsSearchPage.ClickNewClientButton();
            ClientPage clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();
            clientPage.SetFamilyName(clientName);
            //clientPage.PopulateNewClient(clientName);
            clientPage.ClickSaveButton();

            //Navigate to client phone numbers
            driver = driver.SwitchTo().Window(HomeWindow);
            homePage.HoverClientXRibbonTab(clientName);
            homePage.ClickClientXPhoneNumbersRibbonButton();

            //Add new phone numbers
            clientPage = new ClientPage(driver);
            string BaseWindow = driver.CurrentWindowHandle;
            clientPage.ClickAddNewClientPhoneImage();

            //Enter payment reference details
            driver = UICommon.SwitchToNewBrowserWithTitle(driver, BaseWindow, "Client Phone Number");

            //Assert availability list
            ClientPhoneNumberPage clientPhoneNumberPage = new ClientPhoneNumberPage(driver);

            //Create Fixed Line Number
            //clientPhoneNumberPage.ClickTypeList();
            clientPhoneNumberPage.SetTypeListValue("Fixed Line");
            //clientPhoneNumberPage.ClickAreaCodeElement();
            clientPhoneNumberPage.SetAreaCodeValue("07");
            //clientPhoneNumberPage.ClickPhoneNumberElement();
            clientPhoneNumberPage.SetPhoneNumberValue("11111111");
            clientPhoneNumberPage.ClickSaveButton();
            //Assert new phone number has saved
            string FixedLineNumber =  clientPhoneNumberPage.GetPhoneNumber();

            clientPhoneNumberPage.ClickNewButton();
            clientPhoneNumberPage.ClickPageTitle();
            clientPhoneNumberPage.SetClientNameList(clientName);
            //clientPhoneNumberPage.ClickTypeList();
            clientPhoneNumberPage.SetTypeListValue("Mobile");
            //clientPhoneNumberPage.ClickPhoneNumberElement();
            clientPhoneNumberPage.SetPhoneNumberValue("0422222222");
            clientPhoneNumberPage.ClickSaveButton();
            //Assert new phone number has saved
            string MobileNumber = clientPhoneNumberPage.GetPhoneNumber();

            clientPhoneNumberPage.ClickNewButton();
            clientPhoneNumberPage.ClickPageTitle();
            clientPhoneNumberPage.SetClientNameList(clientName);
            //clientPhoneNumberPage.ClickTypeList();
            clientPhoneNumberPage.SetTypeListValue("Fax");
            //clientPhoneNumberPage.ClickAreaCodeElement();
            clientPhoneNumberPage.SetAreaCodeValue("07");
            //clientPhoneNumberPage.ClickPhoneNumberElement();
            clientPhoneNumberPage.SetPhoneNumberValue("33333333");
            clientPhoneNumberPage.ClickSaveButton();
            //Assert new phone number has saved
            string FaxNumber =  clientPhoneNumberPage.GetPhoneNumber();

            clientPhoneNumberPage.ClickNewButton();
            clientPhoneNumberPage.ClickPageTitle();
            clientPhoneNumberPage.SetClientNameList(clientName);
            //clientPhoneNumberPage.ClickTypeList();
            clientPhoneNumberPage.SetTypeListValue("Pager");
            //clientPhoneNumberPage.ClickAreaCodeElement();
            clientPhoneNumberPage.SetAreaCodeValue("07");
            //clientPhoneNumberPage.ClickPhoneNumberElement();
            clientPhoneNumberPage.SetPhoneNumberValue("44444444");
            clientPhoneNumberPage.ClickSaveButton();
            //Assert new phone number has saved
            string PagerNumber =clientPhoneNumberPage.GetPhoneNumber();

            clientPhoneNumberPage.ClickSaveCloseButton();
            clientPhoneNumberPage.ClickSaveCloseButton();
            clientPhoneNumberPage.ClickSaveCloseButton();
            clientPhoneNumberPage.ClickSaveCloseButton();

            // Verify that Activities table is not showing any activity
            driver = driver.SwitchTo().Window(HomeWindow);
            homePage.ClickClientXRibbonTab(clientName);
            clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();

            Table table = new Table(UICommon.GetSearchResultTable(driver));

            Assert.IsTrue(table.GetNoRecordsInTable(), "Client Phone Number Updation Activity Getting displayed !!!!!");

            // Update the Personal Mobile, Personal Preferred Contact Number, Work Preferred Contact Number and Fax and save the record
            clientPage.SetMobileNumber(MobileNumber);
            clientPage.SetPersonalPreferredMobileNumber(FixedLineNumber);
            clientPage.SetWorkPreferredNumber(PagerNumber);
            clientPage.SetFaxNumber(FaxNumber);

            clientPage.ClickSaveCloseButton();

            clientsSearchPage = new ClientsSearchPage(driver);
            clientsSearchPage.SetClientSearchText(clientName);
            table = new Table(clientsSearchPage.GetSearchResultTable());
            table.ClickCellValue("Full Name", clientName, "Full Name");

            clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();
            Thread.Sleep(500);
            table = new Table(clientPage.GetActivitiesTable());
            Assert.IsTrue(table.MatchingCellFound("Subject", "Client Profile Phone Number updated"), "Client Phone Number Updation Activity NOT displayed !!!!!");
            StringAssert.Contains(table.GetCellValue("Subject", "Client Profile Phone Number updated", "Actual End"), DateTime.Now.ToString("dd/MM/yyyy"));
        }
        public void ATC4440_CRMClientPhoneDelete()
        {
            //Login as CRM default user.
            User user = this.environment.GetUser(SecurityRole.GeneralStaff);
            new LoginDialog().Login(user.Id, user.Password);
            /*
            Person Client is needed with following fields populated:
            - Personal Mobile
            - Personal Preferred Contact Number
            - Work Preferred Contact Number
            - Fax*/
            string clientName = "CLIENT PHONEDEL" + UICommon.GetRandomString(3);

            HomePage homePage = new HomePage(driver);
            string HomeWindow = driver.CurrentWindowHandle;
            homePage.HoverCRMRibbonTab();
            homePage.ClickClientServicesRibbonButton();
            homePage.HoverClientServicesRibbonTab();
            homePage.ClickClientsRibbonButton();

            ClientsSearchPage clientsSearchPage = new ClientsSearchPage(driver);
            clientsSearchPage.ClickNewClientButton();
            ClientPage clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();
            Thread.Sleep(1000);

            clientPage.SetFamilyName(clientName);
            clientPage.ClickSaveButton();

            //Navigate to client phone numbers
            driver = driver.SwitchTo().Window(HomeWindow);
            homePage.HoverClientXRibbonTab(clientName);
            homePage.ClickClientXPhoneNumbersRibbonButton();

            //Add new phone numbers
            clientPage = new ClientPage(driver);
            string BaseWindow = driver.CurrentWindowHandle;
            clientPage.ClickAddNewClientPhoneImage();

            //Enter payment reference details
            driver = UICommon.SwitchToNewBrowserWithTitle(driver, BaseWindow, "Client Phone Number");

            //Assert availability list
            ClientPhoneNumberPage clientPhoneNumberPage = new ClientPhoneNumberPage(driver);

            //Create Fixed Line Number
            clientPhoneNumberPage.SetTypeListValue("Fixed Line");
            clientPhoneNumberPage.SetAreaCodeValue("07");
            clientPhoneNumberPage.SetPhoneNumberValue("11111111");
            clientPhoneNumberPage.ClickSaveButton();
            //Assert new phone number has saved
            string FixedLineNumber = clientPhoneNumberPage.GetPhoneNumber();

            clientPhoneNumberPage.ClickNewButton();
            clientPhoneNumberPage.ClickPageTitle();
            clientPhoneNumberPage.SetClientNameList(clientName);
            clientPhoneNumberPage.SetTypeListValue("Mobile");
            clientPhoneNumberPage.SetPhoneNumberValue("0422222222");
            clientPhoneNumberPage.ClickSaveButton();
            //Assert new phone number has saved
            string MobileNumber = clientPhoneNumberPage.GetPhoneNumber();

            clientPhoneNumberPage.ClickNewButton();
            clientPhoneNumberPage.ClickPageTitle();
            clientPhoneNumberPage.SetClientNameList(clientName);
            clientPhoneNumberPage.SetTypeListValue("Fax");
            clientPhoneNumberPage.SetAreaCodeValue("07");
            clientPhoneNumberPage.SetPhoneNumberValue("33333333");
            clientPhoneNumberPage.ClickSaveButton();
            //Assert new phone number has saved
            string FaxNumber = clientPhoneNumberPage.GetPhoneNumber();

            clientPhoneNumberPage.ClickNewButton();
            clientPhoneNumberPage.ClickPageTitle();
            clientPhoneNumberPage.SetClientNameList(clientName);
            clientPhoneNumberPage.SetTypeListValue("Pager");
            clientPhoneNumberPage.SetAreaCodeValue("07");
            clientPhoneNumberPage.SetPhoneNumberValue("44444444");
            clientPhoneNumberPage.ClickSaveButton();
            //Assert new phone number has saved
            string PagerNumber = clientPhoneNumberPage.GetPhoneNumber();

            clientPhoneNumberPage.ClickSaveCloseButton();
            clientPhoneNumberPage.ClickSaveCloseButton();
            clientPhoneNumberPage.ClickSaveCloseButton();
            clientPhoneNumberPage.ClickSaveCloseButton();

            // Verify that Activities table is not showing any activity
            driver = driver.SwitchTo().Window(HomeWindow);
            homePage.ClickClientXRibbonTab(clientName);
            clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();

            Table table = new Table(UICommon.GetSearchResultTable(driver));

            Assert.IsTrue(table.GetNoRecordsInTable(), "Client Phone Number Updation Activity Getting displayed !!!!!");

            // Update the Personal Mobile, Personal Preferred Contact Number, Work Preferred Contact Number and Fax and save the record
            clientPage.SetMobileNumber(MobileNumber);
            clientPage.SetPersonalPreferredMobileNumber(FixedLineNumber);
            clientPage.SetWorkPreferredNumber(PagerNumber);
            clientPage.SetFaxNumber(FaxNumber);

            clientPage.ClickSaveButton();
            string clientId = clientPage.GetClientID();

            clientPage.ClickSaveCloseButton();

            //Clients Services > Clients Double click on the prepared record
            clientsSearchPage = new ClientsSearchPage(driver);
            clientsSearchPage.SetClientSearchText(clientId);
            table = new Table(clientsSearchPage.GetSearchResultTable());
            table.ClickCellValue("RTA Client Id", clientId, "Full Name");

            clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();
            Thread.Sleep(500);
            string date = DateTime.Today.ToString("d/MM/yyyy");
            string time = DateTime.Now.ToString("h:mm tt");
            /*Clear the following fields and save record:
            - Personal Mobile
            - Personal Preferred Contact Number
            - Work Preferred Contact Number
            - Fax*/

            clientPage.ClearMobileNumber();
            clientPage.ClickPageTitle();
            clientPage.ClearPersonalPreferredMobileNumber();
            clientPage.ClickPageTitle();
            clientPage.ClearWorkPreferredNumber();
            clientPage.ClickPageTitle();
            clientPage.ClearFaxNumber();

            clientPage.ClickSaveCloseButton();

            clientsSearchPage = new ClientsSearchPage(driver);
            clientsSearchPage.SetClientSearchText(clientId);
            table = new Table(clientsSearchPage.GetSearchResultTable());
            table.ClickCellValue("RTA Client Id", clientId, "Full Name");
            clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();

            //Inspect resultant entry in Activity sub grid.
            Table headerTable = new Table(clientPage.GetActivitiesHeaderTable());
            headerTable.ClickTableColumnHeader("Actual End");
            Thread.Sleep(2000);

            Table activitiesTable = new Table(clientPage.GetActivitiesTable());
            Assert.IsTrue(activitiesTable.MatchingCellFound("Subject", "Client Profile Phone Number updated"), "Client Phone Number Updation Activity NOT displayed !!!!!");

            activitiesTable.ClickCellValue("Subject", "Client Profile Phone Number updated", "Subject");

            //Client Management Activity is created as a note to users that the phone numbers were changed (includes current value of each field and a note referring the user to audit history).
            ClientManagementActivityPage activityPage = new ClientManagementActivityPage(driver);
            activityPage.ClickPageTitle();
            StringAssert.Contains(activityPage.GetDescription(), "Personal Mobile:   [no value]");
            StringAssert.Contains(activityPage.GetDescription(), "Personal Preferred Contact Number:   [no value]");
            StringAssert.Contains(activityPage.GetDescription(),"Work Preferred Contact Number:   [no value]");
            StringAssert.Contains(activityPage.GetDescription(), "Fax:   [no value]");
            StringAssert.Contains(activityPage.GetDescription(), "Note: the current values are displayed above. Refer to Audit History against the Client record for more information.");

            homePage.HoverCRMRibbonTab();
            homePage.ClickClientServicesRibbonButton();
            homePage.HoverClientServicesRibbonTab();
            homePage.ClickClientsRibbonButton();

            clientsSearchPage = new ClientsSearchPage(driver);
            clientsSearchPage.SetPageFilterList("Active Clients");

            clientsSearchPage.SetClientSearchText(clientId);

            Table clientTable = new Table(clientsSearchPage.GetSearchResultTable());
            IWebElement clientCell = clientTable.GetCellElementContainsValue("RTA Client Id", clientId, "Full Name");
            UICommon.DoubleClickElement(clientCell, driver);

            Thread.Sleep(5000);
            clientPage = new ClientPage(driver, "Clients Quick");

            /*Select the [Audit History] option from the entity navigation menu in the global ribbon.
             *Inspect audit history relating to deletions made in this test*/

            homePage.HoverClientRibbonTab(clientName);
            homePage.ClickClientXAuditRibbonButton();

            clientPage = new ClientPage(driver, "Clients Quick");
            Thread.Sleep(2000);

            /*Audit history shows:
            - What was deleted
            - Who deleted it
            - When it was deleted
            - What previous value was*/
            Table auditTable = new Table(clientPage.GetAuditHistoryTable());

            StringAssert.Contains(auditTable.GetCellValue("Event", "Update", "Changed Field"), "Fax");
            StringAssert.Contains(auditTable.GetCellValue("Event", "Update", "Changed Field"), "Mobile");
            StringAssert.Contains(auditTable.GetCellValue("Event", "Update", "Changed Field"), "Personal Preferred Contact Number");
            StringAssert.Contains(auditTable.GetCellValue("Event", "Update", "Changed Field"), "Work Preferred Contact Number");

            StringAssert.Contains(auditTable.GetCellValue("Event", "Update", "Old Value"), "+61 7 3333 3333");
            StringAssert.Contains(auditTable.GetCellValue("Event", "Update", "Old Value"), "+61 422 222 222");
            StringAssert.Contains(auditTable.GetCellValue("Event", "Update", "Old Value"), "+61 7 3333 3333");
            StringAssert.Contains(auditTable.GetCellValue("Event", "Update", "Old Value"), "+61 7 1111 1111");
            StringAssert.Contains(auditTable.GetCellValue("Event", "Update", "Old Value"), "+61 7 4444 4444");

            Assert.AreEqual(String.Empty, auditTable.GetCellValue("Event", "Update", "New Value").Trim());
            Assert.AreEqual(user.Id.ToLower() + " user", auditTable.GetCellValue("Event", "Update", "Changed By").ToLower());
            Assert.AreEqual(date + " " + time, auditTable.GetCellValue("Event", "Update", "Changed Date"));
        }
        public void ATC4444_CRMClientEmailDelete()
        {
            //Login as CRM default user.
            User user = this.environment.GetUser(SecurityRole.GeneralStaff);
            new LoginDialog().Login(user.Id, user.Password);

            /*Data preparation step
            Organisation Client is needed with following fields populated:
            - Email 1
            - Email 2*/

            string clientName = "CLIENTEMAILDEL" + UICommon.GetRandomString(3);

            HomePage homePage = new HomePage(driver);
            string HomeWindow = driver.CurrentWindowHandle;
            homePage.HoverCRMRibbonTab();
            homePage.ClickClientServicesRibbonButton();
            homePage.HoverClientServicesRibbonTab();
            homePage.ClickClientsRibbonButton();

            ClientsSearchPage clientsSearchPage = new ClientsSearchPage(driver);
            clientsSearchPage.ClickNewClientButton();
            ClientPage clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();
            clientPage.SetClientType("Organisation");
            clientPage.SetOrganizationName(clientName);
            clientPage.ClickSaveButton();

            string email1 = clientName + "*****@*****.**";
            string email2 = clientName + "*****@*****.**";

            clientPage.SetEmail1ID(clientName + "*****@*****.**");
            clientPage.SetEmail2ID(clientName + "*****@*****.**");

            clientPage.ClickSaveButton();

            Assert.AreEqual(email1, clientPage.GetEmail1ID(),"Validate the email id1 is set correctly");
            Assert.AreEqual(email2, clientPage.GetEmail2ID(),"Validate the email id2 is set correctly");

            string clientID = clientPage.GetClientID();
            clientPage.ClickSaveCloseButton();

            clientsSearchPage = new ClientsSearchPage(driver);
            clientsSearchPage.SetClientSearchText(clientID);

            Table clientTable = new Table(clientsSearchPage.GetSearchResultTable());
            clientTable.ClickCellValue("RTA Client Id", clientID, "Full Name");

            //Clear the following fields and save record:- Email 1- Email 2
            clientPage = new ClientPage(driver);
            clientPage.ClearEmail1Id();
            clientPage.ClearEmail2Id();
            string date = DateTime.Today.ToString("d/MM/yyyy");
            string time = DateTime.Now.ToString("h:mm tt");

            clientPage.ClickSaveCloseButton();
            clientsSearchPage = new ClientsSearchPage(driver);
            clientsSearchPage.SetClientSearchText(clientID);

            clientTable = new Table(clientsSearchPage.GetSearchResultTable());
            clientTable.ClickCellValue("RTA Client Id", clientID, "Full Name");

            clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();

            //Inspect resultant entry in Activity sub grid.
            Table headerTable = new Table(clientPage.GetActivitiesHeaderTable());
            headerTable.ClickTableColumnHeader("Actual End");
            Thread.Sleep(2000);

            Table activitiesTable = new Table(clientPage.GetActivitiesTable());

            //Client Management Activity is created as a note to users that the email address fields were changed (includes current value of each field and a note referring the user to audit history).
            Assert.IsTrue(activitiesTable.MatchingCellFound("Subject", "Client E-mail Address updated"), "Client Management Activity for Email field updation Created!!!");
            activitiesTable.ClickCellValue("Subject", "Client E-mail Address updated", "Subject");

            ClientManagementActivityPage activityPage = new ClientManagementActivityPage(driver);
            activityPage.ClickPageTitle();
            StringAssert.Contains(activityPage.GetDescription(), "Email Address (primary):   [no value]");
            StringAssert.Contains(activityPage.GetDescription(), "Email Address (secondary):   [no value]");
            StringAssert.Contains(activityPage.GetDescription(), "Note: the current values are displayed above. Refer to Audit History against the Client record for more information.");

            //Select the [Audit History] option from the entity navigation menu in the global ribbon. Inspect audit history relating to deletions made in this test.
            homePage.HoverClientServicesRibbonTab();
            homePage.ClickClientsRibbonButton();

            clientsSearchPage = new ClientsSearchPage(driver);
            clientsSearchPage.SetClientSearchText(clientID);

            clientTable = new Table(clientsSearchPage.GetSearchResultTable());

            clientTable.ClickCellValue("RTA Client Id", clientID, "Full Name");

            clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();

            homePage.HoverClientRibbonTab(clientName);
            homePage.ClickClientXAuditRibbonButton();

            clientPage = new ClientPage(driver);
            Thread.Sleep(2000);

            /*Audit history shows:
            - What was deleted
            - Who deleted it
            - When it was deleted
            - What previous value was*/
            clientPage = new ClientPage(driver);
            Table auditTable = new Table(clientPage.GetAuditHistoryTable());
            StringAssert.Contains(auditTable.GetCellValue("Event", "Update", "Changed Field"), "Email Address (primary)");
            StringAssert.Contains(auditTable.GetCellValue("Event", "Update", "Changed Field"), "Email Address (secondary)");

            Assert.AreEqual(email1+System.Environment.NewLine+email2, auditTable.GetCellValue("Event", "Update", "Old Value"));
            Assert.AreEqual(String.Empty,auditTable.GetCellValue("Event", "Update", "New Value").Trim());
            Assert.AreEqual(user.Id.ToLower() + " user", auditTable.GetCellValue("Event", "Update", "Changed By").ToLower());
            Assert.AreEqual( date + " " +time, auditTable.GetCellValue("Event", "Update", "Changed Date"));
        }
        public void ATC4439_ClientAlertsValidation()
        {
            //Login in as role
            User user = this.environment.GetUser(SecurityRole.Investigations);
            new LoginDialog().Login(user.Id, user.Password);

            //Navigate to: Client Services group > Clients tile
            HomePage homePage = new HomePage(driver);
            homePage.HoverCRMRibbonTab();
            homePage.ClickClientServicesRibbonButton();
            homePage.HoverClientServicesRibbonTab();
            homePage.ClickClientsRibbonButton();

            //Double-click on a Organisation record.
            ClientsSearchPage clientsSearchPage = new ClientsSearchPage(driver);
            clientsSearchPage.ClickNewClientButton();

            ClientPage clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();

            clientPage.SetClientType("Organisation");
            clientPage.SetOrganizationName("TC AlertValidation");
            clientPage.ClickSaveButton();
            string clientID = clientPage.GetClientID();
            clientPage.ClickSaveCloseButton();

            clientsSearchPage = new ClientsSearchPage(driver);
            clientsSearchPage.SetClientSearchText(clientID);

            Table table = new Table(clientsSearchPage.GetSearchResultTable());
            table.ClickCellValue("RTA Client Id", clientID, "Full Name");

            //Inspect Current Alerts section.Click [+] button.
            clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();
            string BaseWindow = driver.CurrentWindowHandle;
            clientPage.ClickAddAlertElement();

            //Set {Alert Type} to 'Other'.{Other Alert} field becomes mandatory and is enabled.
            driver = UICommon.SwitchToNewBrowserWithTitle(driver, BaseWindow, "Alert");
            AlertPage alertPage = new AlertPage(driver);
            alertPage.SetAlertTypeElement("Other");
            Assert.IsTrue(alertPage.VerifyOtherAlertMandatoryFieldIconPresent());

            //Enter free text into {Other Alert} field and {Description}.
            alertPage.SetOtherAlertText("Other Alert One");
            alertPage.SetDesctiptionText("Description Text Test Value One");

            //Saved.Displays as current alert.As per entered.
            alertPage.ClickSaveCloseIMG();
            driver = driver.SwitchTo().Window(BaseWindow);
            clientPage = new ClientPage(driver);

            Table alertTable = new Table(clientPage.GetCurrentAlertsTable());
            StringAssert.Contains(alertTable.GetCellValue("Other Alert", "Other Alert One", "Alert Type"),"Other","Validating whether other alert displayed in current alerts");

            BaseWindow = driver.CurrentWindowHandle;
            //Create another Alert:Set {Start date}.Set {End date} to today.Save record.
            clientPage.ClickAddAlertElement();
            Thread.Sleep(5000);

            driver = UICommon.SwitchToNewBrowserWithTitle(driver, BaseWindow, "Alert");
            alertPage = new AlertPage(driver);
            alertPage.SetAlertTypeElement("Other");

            Assert.IsTrue(alertPage.VerifyOtherAlertMandatoryFieldIconPresent());

            alertPage.SetOtherAlertText("Other Alert Two");
            alertPage.SetDesctiptionText("Description Text Test Value Two");
            alertPage.SetStartDateValue(DateTime.Now.ToString("dd/MM/yyyy"));
            alertPage.SetEndDateValue(DateTime.Now.ToString("dd/MM/yyyy"));

            alertPage.ClickSaveCloseIMG();
            driver.SwitchTo().Window(BaseWindow);

            //Saved.Displays as current alert.As per entered.
            clientPage = new ClientPage(driver);
            alertTable = new Table(clientPage.GetCurrentAlertsTable());
            StringAssert.Contains(alertTable.GetCellValue("Other Alert", "Other Alert Two", "Alert Type"), "Other", "Validating whether other alert displayed in current alerts");

            //Modify record:Set {End date} to yesterday.Save record.
            IWebElement alertElement = alertTable.GetCellElementContainsValue("Other Alert", "Other Alert Two", "Other Alert");
            UICommon.DoubleClickElement(alertElement, driver);

            alertPage = new AlertPage(driver);
            alertPage.SetStartDateValue(DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy"));
            alertPage.SetEndDateValue(DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy"));
            alertPage.ClickSaveCloseIMG();

            //Saved.NOT displayed as current alert.As per entered.
            clientPage = new ClientPage(driver);
            alertTable = new Table(clientPage.GetCurrentAlertsTable());
            Assert.IsFalse(alertTable.MatchingCellFound("Other Alert","Other Alert Two"), "Validating the alert with end date as yeterday not displayed in current alerts");

            //Create more then four current Alerts.
            BaseWindow = driver.CurrentWindowHandle;
            clientPage.ClickAddAlertElement();
            Thread.Sleep(3000);

            driver = UICommon.SwitchToNewBrowserWithTitle(driver, BaseWindow, "Alert");
            alertPage = new AlertPage(driver);
            alertPage.SetAlertTypeElement("Other");

            Assert.IsTrue(alertPage.VerifyOtherAlertMandatoryFieldIconPresent());

            alertPage.SetOtherAlertText("Other Alert Two");
            alertPage.SetDesctiptionText("Description Text Test Value Two");
            alertPage.SetStartDateValue(DateTime.Now.ToString("dd/MM/yyyy"));
            alertPage.SetEndDateValue(DateTime.Now.ToString("dd/MM/yyyy"));

            alertPage.ClickSaveCloseIMG();
            driver = driver.SwitchTo().Window(BaseWindow);

            clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();

            BaseWindow = driver.CurrentWindowHandle;
            clientPage.ClickAddAlertElement();
            Thread.Sleep(3000);

            //Enter Alert details
            driver = UICommon.SwitchToNewBrowserWithTitle(driver, BaseWindow, "Alert");
            alertPage = new AlertPage(driver);
            alertPage.SetAlertTypeElement("Other");

            Assert.IsTrue(alertPage.VerifyOtherAlertMandatoryFieldIconPresent());

            alertPage.SetOtherAlertText("Other Alert Three");
            alertPage.SetDesctiptionText("Description Text Test Value Three");
            alertPage.SetStartDateValue(DateTime.Now.ToString("dd/MM/yyyy"));
            alertPage.SetEndDateValue(DateTime.Now.ToString("dd/MM/yyyy"));

            alertPage.ClickSaveCloseIMG();

            driver = driver.SwitchTo().Window(BaseWindow);

            clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();
            BaseWindow = driver.CurrentWindowHandle;
            clientPage.ClickAddAlertElement();
            Thread.Sleep(3000);

            //Enter Alert details
            driver = UICommon.SwitchToNewBrowserWithTitle(driver, BaseWindow, "Alert");
            alertPage = new AlertPage(driver);
            alertPage.SetAlertTypeElement("Other");

            Assert.IsTrue(alertPage.VerifyOtherAlertMandatoryFieldIconPresent());

            alertPage.SetOtherAlertText("Other Alert Four");
            alertPage.SetDesctiptionText("Description Text Test Value Four");
            alertPage.SetStartDateValue(DateTime.Now.ToString("dd/MM/yyyy"));
            alertPage.SetEndDateValue(DateTime.Now.ToString("dd/MM/yyyy"));

            alertPage.ClickSaveCloseIMG();
            driver = driver.SwitchTo().Window(BaseWindow);

            //Section is dynamic and allows for multi-page display.
            clientPage = new ClientPage(driver);
            clientPage.ClickPageTitle();
            clientPage.ClickNextPageAlertTable();

            alertTable = new Table(clientPage.GetCurrentAlertsTable());
            Assert.IsTrue(alertTable.MatchingCellFound("Other Alert", "Other Alert Four"), "Validating the fourth alert displayed in the next page of alert table");
        }