public void FeedbackTypePartialFilled(string feedbackType, string name, string routeNumber, string skytrainLine, string skytrainlineDirection, string station, string day, string time, string phoneNumber) { FeedbackPage feedbackPage = new FeedbackPage(driver); feedbackPage.GoToFeedbackSiteURL(); feedbackPage.SelectTypeofFeedback(feedbackType); switch (feedbackType) { case "Bus": feedbackPage.EnterRouteNumber(routeNumber); break; case "SkyTrain": feedbackPage.EnterSkytrainLine(skytrainLine); feedbackPage.ClickSkytrainLineDirection(skytrainlineDirection); feedbackPage.SelectSkyTrainStation(skytrainlineDirection, station); break; default: return; } feedbackPage.EnterFirstName(name, feedbackType); feedbackPage.EnterIncidentDate(day, feedbackType); feedbackPage.EnterIncidentTime(time, feedbackType); feedbackPage.EnterPhoneNumber(phoneNumber, feedbackType); feedbackPage.EnterResponseChoice("no", feedbackType); //Thread.Sleep(2000); feedbackPage.EnterResponseChoice("yes", feedbackType); feedbackPage.ClickSubmitButton(feedbackType); }
public void FeedbackNoInput(string feedbackType) { FeedbackPage feedbackPage = new FeedbackPage(driver); feedbackPage.GoToFeedbackSiteURL(); feedbackPage.SelectTypeofFeedback(feedbackType); switch (feedbackType) { case "Bus": Assert.IsTrue(driver.FindElement(By.TagName("body")).Text.Contains(feedbackPage.routeNumberLegend), feedbackPage.routeNumberLegendFailMsg); break; case "SkyTrain": Assert.IsTrue(driver.FindElement(By.TagName("body")).Text.Contains(feedbackPage.skytrainLineLegend), feedbackPage.skytrainLineLegendFailMsg); break; default: return; } feedbackPage.ClickSubmitButton(feedbackType); Assert.IsTrue(driver.FindElement(By.TagName("body")).Text.Contains(feedbackPage.detailsRequiredFieldMsg), feedbackPage.detailRequiredFieldFailMsg); Assert.IsTrue(driver.FindElement(By.TagName("body")).Text.Contains(feedbackPage.nameRequiredFieldMsg), feedbackPage.nameRequiredFieldFailMsg); Assert.IsTrue(driver.FindElement(By.TagName("body")).Text.Contains(feedbackPage.emailRequiredFieldMsg), feedbackPage.emailRequiredFieldFailMsg); }
//[TestCase("ExpoLine", "ExpLineDoNotKnow", "")] public void FeedbackSTLineDirectionTests(string skytrainLine, string sktyrainlineDirection, string station) { FeedbackPage feedbackPage = new FeedbackPage(driver); feedbackPage.GoToFeedbackSiteURL(); feedbackPage.SelectTypeofFeedback("SkyTrain"); feedbackPage.EnterSkytrainLine(skytrainLine); feedbackPage.ClickSkytrainLineDirection(sktyrainlineDirection); feedbackPage.SelectSkyTrainStation(sktyrainlineDirection, station); }
public void FeedbackSiteURL() { FeedbackPage feedbackPage = new FeedbackPage(driver); feedbackPage.GoToFeedbackSiteURL(); Assert.IsTrue(driver.Url.Contains("translink.ca/feedback"), "This is not the Feedback page"); //Verify Page Descriptions Assert.IsTrue(driver.FindElement(By.TagName("body")).Text.Contains(feedbackPage.feedbackDescription), feedbackPage.feedbackDescriptFailMsg); Assert.IsTrue(driver.FindElement(By.TagName("body")).Text.Contains(feedbackPage.dropDownTitle), feedbackPage.dropDownTitleFailMsg); }