コード例 #1
0
        public void ThenTheNotificationHasBeenSuccessfullyCreated()
        {
            //validate the link is present and clickable
            NotificationPage notificationspage = new NotificationPage();

            notificationspage.WaitForThePageToLoad();
            Assert.IsTrue(notificationspage.SuccessMsgDisplayed());
            String notification_name = "//a[contains(text(),'" + ScenarioContext.Current["notificationname"] + "')][1]";

            Driver.CurrentDriver.FindElement(By.XPath(notification_name)).Click();
            System.Threading.Thread.Sleep(5000);

            // validating all entries are completed as expected on folowing page
            Assert.IsTrue(Driver.CurrentDriver.FindElement(By.XPath(notificationspage.Checkelement(ScenarioContext.Current["notificationname"].ToString()))).Displayed);
            Assert.IsTrue(Driver.CurrentDriver.FindElement(By.XPath(notificationspage.Checkelement(ScenarioContext.Current["eventselected"].ToString()))).Displayed);
            Assert.IsTrue(Driver.CurrentDriver.FindElement(By.XPath(notificationspage.Checkelement(ScenarioContext.Current["templateselected"].ToString()))).Displayed);
            Assert.IsTrue(Driver.CurrentDriver.FindElement(By.XPath(notificationspage.Checkelement(ScenarioContext.Current["conditionfield"].ToString()))).Displayed);
        }