Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        //[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);
        }
Пример #4
0
        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);
        }