//Select enviorment to run the automation tests public static void Navigate(TestEnvironment Env) { switch (Env) { case TestEnvironment.Live: //Capture Page Load Times NonFunctionalReq.CaptureTime(() => Driver.Instance.Navigate().GoToUrl("https://www.alpharooms.com"), "Landing Page load time is"); break; case TestEnvironment.Staging: //Capture Page Load Times NonFunctionalReq.CaptureTime(() => Driver.Instance.Navigate().GoToUrl("https://no.staging.alpharooms.com/"), "Landing Page load time is"); break; case TestEnvironment.QA: //Capture Page Load Times NonFunctionalReq.CaptureTime(() => Driver.Instance.Navigate().GoToUrl("http://flightshotfix.alpha2.com/"), "Landing Page load time is"); break; case TestEnvironment.SOAFlights: //Capture Page Load Times NonFunctionalReq.CaptureTime(() => Driver.Instance.Navigate().GoToUrl("http://flights3.alpha2.com/"), "Landing Page load time is"); break; } Logger.Clear(); HomePage.ResetData(); FlightResultsPage.ResetData(); HotelResultsPage.ResetData(); HotelDetailPage.ResetData(); ExtrasPage.ResetData(); InsurancePage.ResetData(); PaymentPage.ResetData(); }
internal static void WaitToLoad() { FlightResultsPage.ResetData(); //Wait for java script to load FlightResultsPage.Data.LoadingTime = NonFunctionalReq.CaptureTime(() => Driver.Instance.WaitForAjax(), "Flight Result Page Rendering Time"); }