public static void EditANewAggregateSum2ndTierCalculaton() { ManageCalculationPage managecalculationpage = new ManageCalculationPage(); EditCalculationsPage editcalculationspage = new EditCalculationsPage(); var aggCalcNumName = ScenarioContext.Current["AggCalcName"]; string aggCalcCreated = aggCalcNumName.ToString(); var addAggCalcNumName = ScenarioContext.Current["AddAggCalcName"]; string addAggCalcCreated = addAggCalcNumName.ToString(); Thread.Sleep(2000); var specCalcName = ScenarioContext.Current["SpecCalcName"]; string specCalcCreated = specCalcName.ToString(); editcalculationspage.CalculationVBEditor.Should().NotBeNull(); editcalculationspage.CalculationVBTextEditor.SendKeys(Keys.Delete); editcalculationspage.CalculationVBTextEditor.SendKeys(Keys.Shift + Keys.End); Thread.Sleep(2000); editcalculationspage.CalculationVBTextEditor.SendKeys("Return Sum(" + aggCalcCreated + ")"); Thread.Sleep(2000); editcalculationspage.BuildCalculationButton.Click(); Thread.Sleep(10000); IWebElement EditCalculationCompiled = Driver._driver.FindElement(By.Id("compiler-response")); string CalculationCompiled = EditCalculationCompiled.Text; CalculationCompiled.Should().Be("Code compiled successfully: true\r\nError: " + addAggCalcCreated + " cannot reference another calc that is being aggregated"); Console.WriteLine(CalculationCompiled); }
public static void ManagetheCalculation() { HomePage homepage = new HomePage(); ManageCalculationPage managecalculationpage = new ManageCalculationPage(); homepage.ManagetheCalculations.Click(); Thread.Sleep(6000); }
public static void ComparePreviousCalculationVersions() { HomePage homepage = new HomePage(); ManageCalculationPage managecalculationpage = new ManageCalculationPage(); EditCalculationsPage editcalculationspage = new EditCalculationsPage(); homepage.ManagetheCalculations.Click(); Thread.Sleep(5000); managecalculationpage.FirstCalculationListed.Click(); Thread.Sleep(2000); editcalculationspage.PreviousCalculationVersionsLink.Click(); }
public static void EditANewCalculaton() { ManageCalculationPage managecalculationpage = new ManageCalculationPage(); EditCalculationsPage editcalculationspage = new EditCalculationsPage(); HomePage homepage = new HomePage(); homepage.Header.Click(); Thread.Sleep(2000); NavigateTo.ManagetheCalculation(); Assert.IsNotNull(managecalculationpage.CalculationSearchField); Thread.Sleep(3000); var specCalcName = ScenarioContext.Current["SpecCalcName"]; string specCalcCreated = specCalcName.ToString(); Driver._driver.FindElement(By.LinkText(specCalcCreated)).Click(); Thread.Sleep(2000); editcalculationspage.SaveCalculationButton.Should().NotBeNull(); Thread.Sleep(2000); var datasetName = ScenarioContext.Current["DatasetSchemaName"]; editcalculationspage.CalculationVBEditor.Should().NotBeNull(); editcalculationspage.CalculationVBTextEditor.SendKeys(Keys.Delete); editcalculationspage.CalculationVBTextEditor.SendKeys(Keys.Shift + Keys.End); Thread.Sleep(2000); editcalculationspage.CalculationVBTextEditor.SendKeys("Return Datasets." + datasetName + ".FullSubtractTimeNumberOfPupilsInYearGroup1SubtractDualRegistrations + 10"); Thread.Sleep(2000); editcalculationspage.BuildCalculationButton.Click(); Thread.Sleep(10000); IWebElement EditCalculationCompiled = Driver._driver.FindElement(By.Id("compiler-response")); string CalculationCompiled = EditCalculationCompiled.Text; CalculationCompiled.Should().Be("Code compiled successfully: true"); Console.WriteLine(CalculationCompiled); editcalculationspage.SaveCalculationButton.Click(); Thread.Sleep(2000); Assert.IsNotNull(managecalculationpage.CalculationSearchField); Thread.Sleep(3000); Console.WriteLine(specCalcCreated + " has been edited successfully"); Thread.Sleep(1000); }
public static void CalculationComparisonPage() { HomePage homepage = new HomePage(); ManageCalculationPage managecalculationpage = new ManageCalculationPage(); EditCalculationsPage editcalculationspage = new EditCalculationsPage(); ViewPreviousCalculationsPage viewpreviouscalculationpage = new ViewPreviousCalculationsPage(); homepage.ManagetheCalculations.Click(); Thread.Sleep(5000); managecalculationpage.FirstCalculationListed.Click(); Thread.Sleep(2000); editcalculationspage.PreviousCalculationVersionsLink.Click(); Thread.Sleep(2000); viewpreviouscalculationpage.CompareFirstCheckBox.Click(); viewpreviouscalculationpage.CompareSecondCheckBox.Click(); viewpreviouscalculationpage.ComparePreviousCalculationsButton.Click(); }
public static void EditANewAggregateSumCalculaton() { ManageCalculationPage managecalculationpage = new ManageCalculationPage(); EditCalculationsPage editcalculationspage = new EditCalculationsPage(); var aggCalcNumName = ScenarioContext.Current["AggCalcName"]; string aggCalcCreated = aggCalcNumName.ToString(); /*Driver._driver.FindElement(By.LinkText(aggCalcCreated)).Click(); * Thread.Sleep(2000); * editcalculationspage.SaveCalculationButton.Should().NotBeNull();*/ Thread.Sleep(2000); var specCalcName = ScenarioContext.Current["SpecCalcName"]; string specCalcCreated = specCalcName.ToString(); editcalculationspage.CalculationVBEditor.Should().NotBeNull(); editcalculationspage.CalculationVBTextEditor.SendKeys(Keys.Delete); editcalculationspage.CalculationVBTextEditor.SendKeys(Keys.Shift + Keys.End); Thread.Sleep(2000); editcalculationspage.CalculationVBTextEditor.SendKeys("Return Sum(" + specCalcCreated + ")"); Thread.Sleep(2000); editcalculationspage.BuildCalculationButton.Click(); Thread.Sleep(10000); IWebElement EditCalculationCompiled = Driver._driver.FindElement(By.Id("compiler-response")); string CalculationCompiled = EditCalculationCompiled.Text; CalculationCompiled.Should().Be("Code compiled successfully: true"); Console.WriteLine(CalculationCompiled); editcalculationspage.SaveCalculationButton.Click(); Thread.Sleep(2000); Assert.IsNotNull(managecalculationpage.CalculationSearchField); Thread.Sleep(3000); Console.WriteLine(specCalcCreated + " has been edited successfully"); Thread.Sleep(1000); }