public void CompareAddingElementInChart() { output.WriteLine($"{DateTime.Now.ToLongTimeString()} Navigating to DataGrid."); var dataGridPage = new DataGridPage(ChromeDriverFixture.Driver); dataGridPage.NavigateTo(); output.WriteLine($"{DateTime.Now.ToLongTimeString()} Add Forecast in Celsious."); dataGridPage.AddForecast(null, "4", null, "Test summary"); output.WriteLine($"{DateTime.Now.ToLongTimeString()} Verify that forecast is properly added."); Assert.Equal("4", dataGridPage.ForecastTable[0].tempC); Assert.Equal("39", dataGridPage.ForecastTable[0].tempF); Assert.Equal("Test summary", dataGridPage.ForecastTable[0].summary); output.WriteLine($"{DateTime.Now.ToLongTimeString()} Navigating to Chart page."); var chartPage = new ChartPage(ChromeDriverFixture.Driver); chartPage.NavigateTo(); output.WriteLine($"{DateTime.Now.ToLongTimeString()} Take screenshot."); ITakesScreenshot screenShotDriver = (ITakesScreenshot)ChromeDriverFixture.Driver; Screenshot screenShot = screenShotDriver.GetScreenshot(); screenShot.SaveAsFile("Chart.bmp", ScreenshotImageFormat.Bmp); output.WriteLine($"{DateTime.Now.ToLongTimeString()} Compare creenshot with original."); FileInfo file = new FileInfo("Chart.bmp"); Approvals.Verify(file); }
public void DeleteForecasts() { output.WriteLine($"{DateTime.Now.ToLongTimeString()} Navigating to DataGrid."); var dataGridPage = new DataGridPage(ChromeDriverFixture.Driver); dataGridPage.NavigateTo(); output.WriteLine($"{DateTime.Now.ToLongTimeString()} Update Forecast"); dataGridPage.DeleteForecast(3); //TODO - Addd verification }
public void UpdateForecasts() { output.WriteLine($"{DateTime.Now.ToLongTimeString()} Navigating to DataGrid."); var dataGridPage = new DataGridPage(ChromeDriverFixture.Driver); dataGridPage.NavigateTo(); output.WriteLine($"{DateTime.Now.ToLongTimeString()} Update Forecast"); dataGridPage.UpdateForecast(3, null, "4", null, "Test summary"); output.WriteLine($"{DateTime.Now.ToLongTimeString()} Verify that forecast is properly added."); Assert.Equal("4", dataGridPage.ForecastTable[3].tempC); Assert.Equal("39", dataGridPage.ForecastTable[3].tempF); Assert.Equal("Test summary", dataGridPage.ForecastTable[3].summary); }
public void AddForecastsWithTemperatureInFahrenheit() { output.WriteLine($"{DateTime.Now.ToLongTimeString()} Navigating to DataGrid."); var dataGridPage = new DataGridPage(ChromeDriverFixture.Driver); dataGridPage.NavigateTo(); output.WriteLine($"{DateTime.Now.ToLongTimeString()} Add Forecast in Fahrenheit."); dataGridPage.AddForecast(null, null, "39", "Test summary"); output.WriteLine($"{DateTime.Now.ToLongTimeString()} Verify that forecast is properly added."); Assert.Equal("4", dataGridPage.ForecastTable[0].tempC); Assert.Equal("39", dataGridPage.ForecastTable[0].tempF); Assert.Equal("Test summary", dataGridPage.ForecastTable[0].summary); }