public static void ClassInitialize(TestContext context) { driver = new ChromeDriver(Environment.CurrentDirectory); HighchartsPage chartsPage = new HighchartsPage(driver); chartsPage.GoToPage(); chartsPage.HoverToChartsArea(); chartsPage.HideFlags(); }
public void RevenueChartTest() { HighchartsPage chartsPage = new HighchartsPage(driver); IList <IWebElement> currentChart = chartsPage.GetRevenueChart(); List <string> actualResult = new List <string>(); foreach (IWebElement i in currentChart) { string toolTipText = chartsPage.GetTooltipText(i); actualResult.Add(toolTipText); } List <string> expected = File.ReadAllLines("RevenueChart.txt").ToList(); CollectionAssert.AreEqual(expected, actualResult); }