public virtual void TestSetup() { App = AppInitializer.StartApp(Platform); WeatherPage = new WeatherPage(App, Platform); ForecastPage = new ForecastPage(App, Platform); }
public void TapFeedbackButton() { //Arrange //Act WeatherPage.TapFeedbackButton(); //Assert Assert.IsTrue(WeatherPage.IsFeedbackPageOpen()); }
public void TapCrashButton() { //Arrange //Act WeatherPage.TapForecastTab(); ForecastPage.TapCrashButton(); //Assert }
void ToggleScreens(bool isToggleScreensEnabled) { if (!isToggleScreensEnabled) { return; } if (WeatherPage.IsWeatherPageVisible()) { WeatherPage.TapForecastTab(); ForecastPage.TapWeatherTab(); } else { ForecastPage.TapWeatherTab(); WeatherPage.TapForecastTab(); } }
public void GetWeatherUsingGPS(bool toggleScreensBeforeTest) { //Arrange string actualTemperatureLabelText, actualConditionLabelText; //Act ToggleScreens(toggleScreensBeforeTest); WeatherPage.ToggleGPSSwitch(); WeatherPage.TapGetWeatherButton(); Thread.Sleep(2000); WeatherPage.WaitForNoActivityIndicator(); //Assert actualConditionLabelText = WeatherPage.GetConditionText(); actualTemperatureLabelText = WeatherPage.GetTemperatureText(); Assert.IsNotEmpty(actualConditionLabelText, "Condition Text Is Empty"); Assert.IsNotEmpty(actualTemperatureLabelText, "Temperature Text Is Empty"); }
public void GetWeatherUsingText(string location, bool toggleScreensBeforeTest) { //Arrange string expectedConditionCityText = ParseConditionCityFromString(location, ','); string actualTemperatureLabelText, actualConditionCityText; //Act ToggleScreens(toggleScreensBeforeTest); WeatherPage.EnterLocation(location); WeatherPage.TapGetWeatherButton(); Thread.Sleep(2000); WeatherPage.WaitForNoActivityIndicator(); //Assert actualConditionCityText = ParseConditionCityFromString(WeatherPage.GetConditionText(), ':'); actualTemperatureLabelText = WeatherPage.GetTemperatureText(); Assert.AreEqual(expectedConditionCityText, actualConditionCityText, "Exptected Condition City Does Not Match Actual Condition City"); Assert.IsNotEmpty(actualTemperatureLabelText, "Temperature Text Is Empty"); }
public override void TestSetup() { base.TestSetup(); WeatherPage.WaitForPageToLoad(); App.Screenshot("App Launched"); }