Exemplo n.º 1
0
        public static void CreateAnAdditionalAggregateCalculation_Number()

        {
            CreateCalculationPage createcalculationpage = new CreateCalculationPage();
            ManagePoliciesPage    managepoliciespage    = new ManagePoliciesPage();


            string newname         = "TestAggCalculationName";
            string descriptiontext = "This is a Description for: ";

            var randomSpecCalcName = newname + TestDataUtils.RandomString(6);

            ScenarioContext.Current["AddAggCalcName"] = randomSpecCalcName;
            managepoliciespage.CreateCalculation.Click();
            Thread.Sleep(2000);
            createcalculationpage.CalculationName.SendKeys(randomSpecCalcName);
            createcalculationpage.CalculationDescription.SendKeys(descriptiontext + randomSpecCalcName);
            Actions.CreateCalculationSpecificationpageSelectPolicyOrSubpolicyDropDown();

            var calctype      = createcalculationpage.CalculationTypeDropDown;
            var selectElement = new SelectElement(calctype);

            selectElement.SelectByValue("Number");

            createcalculationpage.SaveCalculation.Click();
            Thread.Sleep(2000);
            var    aggCalcNumName = ScenarioContext.Current["AddAggCalcName"];
            string aggCalcCreated = aggCalcNumName.ToString();

            Console.WriteLine(aggCalcCreated + " has been created successfully");
            Thread.Sleep(5000);
        }
        public static void CreateCalculation()
        {
            HomePage homepage = new HomePage();
            ManageSpecificationPage managepecificationpage = new ManageSpecificationPage();
            ManagePoliciesPage      managepoliciespage     = new ManagePoliciesPage();
            CreateCalculationPage   createcalculationpage  = new CreateCalculationPage();

            CreateNewPESportSpecification.CreateANewPESportSpecification();
            ManageSpecificationCreateNewPolicy.CreateANewSpecificationPolicy();
            managepoliciespage.CreateCalculation.Click();
        }
        public static void CreateANewSpecification_VarYr()

        {
            ManageSpecificationPage managespecficationpage  = new ManageSpecificationPage();
            CreateSpecificationPage createspecificationpage = new CreateSpecificationPage();
            CreateCalculationPage   createcalculationpage   = new CreateCalculationPage();
            HomePage homepage = new HomePage();

            string newname         = "Test Spec Name ";
            string descriptiontext = "This is a Description for: ";
            string fundingStreams  = "all";

            NavigateTo.CreatetheSpecfication();
            Assert.IsNotNull(createcalculationpage.CalculationName);
            Thread.Sleep(2000);
            var randomSpecName = newname + TestDataUtils.RandomString(6);

            ScenarioContext.Current["SpecificationName"] = randomSpecName;

            createspecificationpage.SpecName.SendKeys(randomSpecName);
            createspecificationpage.SpecDescription.SendKeys(descriptiontext + randomSpecName);
            var selectYear = createspecificationpage.SpecFundingPeriod;

            var    specYear      = ScenarioContext.Current["SpecificationYear"];
            string specAcYear    = specYear.ToString();
            var    selectElement = new SelectElement(selectYear);

            selectElement.SelectByValue(specAcYear);
            //createspecificationpage.FundingStream.Click();
            //createspecificationpage.FundingStream.SendKeys(OpenQA.Selenium.Keys.Enter);
            Actions.CreateSpecificationChooseAllFundingStreams(fundingStreams);
            Thread.Sleep(2000);
            createspecificationpage.SaveSpecification.Click();
            Thread.Sleep(2000);

            homepage.Header.Click();
            Thread.Sleep(2000);
            homepage.ManagetheSpecification.Click();
            Thread.Sleep(2000);

            var    specName    = ScenarioContext.Current["SpecificationName"];
            string specCreated = specName.ToString();

            Console.WriteLine(specCreated + " has been created successfully");
            Driver._driver.FindElement(By.LinkText(specCreated)).Click();
            Thread.Sleep(1000);
        }
Exemplo n.º 4
0
        public static void CreateANewSpecificationPolicy_Baseline()

        {
            CreateCalculationPage createcalculationpage = new CreateCalculationPage();
            ManagePoliciesPage    managepoliciespage    = new ManagePoliciesPage();


            string newname         = "TestBaselineCalculationName";
            string descriptiontext = "This is a Description for: ";

            var randomSpecCalcName = newname + TestDataUtils.RandomString(6);

            ScenarioContext.Current["SpecCalcName"] = randomSpecCalcName;
            managepoliciespage.CreateCalculation.Click();
            Thread.Sleep(2000);
            createcalculationpage.CalculationName.SendKeys(randomSpecCalcName);
            createcalculationpage.CalculationDescription.SendKeys(descriptiontext + randomSpecCalcName);
            Actions.CreateCalculationSpecificationpageSelectPolicyOrSubpolicyDropDown();

            var calctype      = createcalculationpage.CalculationTypeDropDown;
            var selectElement = new SelectElement(calctype);

            selectElement.SelectByValue("Baseline");

            var allocation      = createcalculationpage.CalculationAllocationLine;
            var selectElement01 = new SelectElement(allocation);

            selectElement01.SelectByValue("YPM07");

            createcalculationpage.SaveCalculation.Click();
            Thread.Sleep(2000);
            var    specCalcNumName    = ScenarioContext.Current["SpecCalcName"];
            string numSpecCalcCreated = specCalcNumName.ToString();

            Console.WriteLine(numSpecCalcCreated + " has been created successfully");
            Thread.Sleep(5000);
        }