public void ATC6710_CRMMasterCaseInvestigationCaseOptionalTasks()
        {
            string INVNumber;
            User user = this.environment.GetUser(SecurityRole.Investigations);
            new LoginDialog().Login(user.Id, user.Password);

            HomePage homePage = new HomePage(driver);
            homePage.HoverCRMRibbonTab();
            homePage.ClickInvestigationsRibbonButton();
            homePage.HoverInvestigationsRibbonTab();
            homePage.ClickInvestigationsMasterCasesRibbonButton();

            InvestigationMasterCaseSearchPage investigationMasterCasesSearchPage = new InvestigationMasterCaseSearchPage(driver);
            investigationMasterCasesSearchPage.ClickNewButton();

            InvestigationMasterCasePage investigationMasterCasePage = new InvestigationMasterCasePage(driver);
            investigationMasterCasePage.ClickSaveButton();
            INVNumber = investigationMasterCasePage.GetInvestigationMasterCaseNumber();
            investigationMasterCasePage.ClickSaveCloseButton();
            investigationMasterCasesSearchPage = new InvestigationMasterCaseSearchPage(driver);
            investigationMasterCasesSearchPage.SetInvestigationSearchText(INVNumber);
            Table table = new Table(investigationMasterCasesSearchPage.GetSearchResultTable());
            table.ClickCellContainsValueEnterRow("Master Case ID", INVNumber, "Master Case ID");
            investigationMasterCasePage = new InvestigationMasterCasePage(driver);
            investigationMasterCasePage.ClickPageTitle();
            investigationMasterCasePage.ClickActivitiesAddButton();
            investigationMasterCasePage.ClickCRMToolbar();
            string BaseWindow = driver.CurrentWindowHandle; //Records the current window handle
            investigationMasterCasePage.ClickAddTaskButton("Task");
            Thread.Sleep(3000);
            //Enter Request Party details
            driver = investigationMasterCasePage.SwitchNewBrowserWithTitle(driver, BaseWindow, "Task");

            TaskPage taskPage = new TaskPage(driver);
            string[] subjects = new string[] {
                "Relevant address added",
                "Allocate to investigator",
                "Relevant bond background searches",
                "Follow-up request to be sent to complainant(s)",
                "Request to be sent (compelled by law)",
                "Follow-up request to be sent to third party",
                "Visit complainant",
                "Visit other witness",
                "Visit subject premises",
                "Visit other premises",
                "Visit respondent",
                "Execute warrant(s)",
                "Follow-up request to be sent to respondent",
                "Acknowledgement to be sent to respondent",
                "Send closure letter to respondent(s)",
                "Send closure letter to complainant(s)",
                "Additional investigations required",
                "Seek executive approval to prosecute",
                "Issue PIN",
                "Awaiting PIN referral to SPER"
            };

            foreach (string i in subjects)
            {
                taskPage.ClickPageTitle();
                Thread.Sleep(2000);
                taskPage.SetSelectSubjectValue(i);
                StringAssert.Contains(taskPage.GetSubjectValue(), i);

            }

            taskPage.ClickSaveCloseButton();

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

            homePage.HoverCRMRibbonTab();
            homePage.ClickInvestigationsRibbonButton();
            homePage.HoverInvestigationsRibbonTab();
            homePage.ClickInvestigationsCasesRibbonButton();

            InvestigationCaseSearchPage investigationCaseSearchPage = new InvestigationCaseSearchPage(driver);
            investigationCaseSearchPage.ClickNewInvestigationCaseButton();

            InvestigationCasePage investigationCasePage = new InvestigationCasePage(driver);
            Thread.Sleep(3000);
            investigationCasePage.ClickSaveButton();
            investigationCasePage.GetInvestigationCaseNumber();
            investigationCasePage.ClickActivitiesAddButton();
            investigationCasePage.ClickCRMToolbar();
            BaseWindow = driver.CurrentWindowHandle; //Records the current window handle
            investigationCasePage.ClickAddTaskButton("Task");
            Thread.Sleep(3000);
            //Enter Request Party details
            driver = investigationCasePage.SwitchNewBrowserWithTitle(driver, BaseWindow, "Task");

            taskPage = new TaskPage(driver);
            subjects = new string[] {
                "Relevant address added",
                "Allocate to investigator",
                "Relevant bond background searches",
                "Follow-up request to be sent to complainant(s)",
                "Request to be sent (compelled by law)",
                "Follow-up request to be sent to third party",
                "Visit complainant",
                "Visit other witness",
                "Visit subject premises",
                "Visit other premises",
                "Visit respondent",
                "Execute warrant(s)",
                "Follow-up request to be sent to respondent",
                "Acknowledgement to be sent to respondent",
                "Send closure letter to complainant(s)",
                "Send closure letter to respondent(s)",
                "Additional investigations required",
                "Seek executive approval to prosecute",
                "Issue PIN",
                "Awaiting PIN referral to SPER"
            };

            foreach (string i in subjects)
            {
                taskPage.ClickPageTitle();
                taskPage.SetSelectSubjectValue(i);
                StringAssert.Contains(taskPage.GetSubjectValue(), i);

            }

            taskPage.ClickSaveCloseButton();
            driver = driver.SwitchTo().Window(BaseWindow);
        }