public void GivenIAddOrUpdateTheDescriptionOnProfilePage()
        {
            //   ScenarioContext.Current.Pending();
            //Read data from excel data file
            ExcelLib.PopulateInCollection(ExcelPath, "profile");
            string profileDescription = ExcelLib.ReadData(2, "Description");
            // Add/edit/update description
            profile profileObj = new profile();

            profileObj.EditProfileDesc(profileDescription);
        }
コード例 #2
0
        public void UpdateProfileDescValidate()
        {
            //Read data from excel data file
            ExcelLib.PopulateInCollection(Base.ExcelPath, "profile");
            string profileDescription = ExcelLib.ReadData(2, "Description");
            // Add/edit/update description
            profile profileObj = new profile();

            profileObj.EditProfileDesc(profileDescription);

            //Validate the message confirmation displayed
            string expMessage = "Description has been saved successfully";
            string actMessage = driver.FindElement(By.XPath("/html/body/div/div[@class='ns-box-inner']")).Text;

            Assert.AreEqual(expMessage, actMessage, "Getting expected message failed");

            //Validate - Description display correctly
            string actDescription = driver.FindElement(By.XPath("//span[contains(@style,'padding-top: 1em;')]")).Text;

            Assert.AreEqual(profileDescription, actDescription, "Description mismatch - update has failed");
        }