Exemplo n.º 1
0
        public void GivenIClickOnSkillsTab()
        {
            var skillsObj = new ProfileSkills();

            _scenarioContext["skillsObj"] = skillsObj;
            skillsObj.ClickSkillsTab();
        }
Exemplo n.º 2
0
 private void skillsParse(HtmlNode[] nodes)
 {
     foreach (var tag in nodes)
     {
         if (tag.Attributes["class"] != null && tag.Attributes["class"].Value == "endorse-item has-endorsements ")
         {
             ProfileSkills newSkill = new ProfileSkills();
             newSkill.skill = tag.Attributes["data-endorsed-item-name"].Value;
             linkedinProfile.ProfileSkills.Add(newSkill);
         }
     }
 }
Exemplo n.º 3
0
            public void TestProfileSkillDetail()
            {
                test = extent.StartTest("Skills Add/update/delete detail");
                GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPathProfileDetail, "Skill");
                ProfileSkills profileSkill = new ProfileSkills();

                profileSkill.NavigateToSkillsTab();
                profileSkill.AddSkills();
                profileSkill.ValidateAddedSkills();
                profileSkill.DeleteSkill();
                profileSkill.ValidateDeletedSkill();
                profileSkill.UpdateAddedSkill();
                profileSkill.ValidateUpdatedSkill();
            }
Exemplo n.º 4
0
        public void DeleteSkillnValidate()
        {
            //read data from excel data file
            ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile->Skills");
            string skillName  = ExcelLib.ReadData(4, "SkillName");
            string skillLevel = ExcelLib.ReadData(4, "SkillLevel");

            //Delete skill
            ProfileSkills skillsObj = new ProfileSkills();

            skillsObj.ClickSkillsTab();
            skillsObj.DeleteSkill(skillName);

            //Validate the message
            string expectedMsg = skillName + " has been deleted";
            string actualMsg   = Driver.FindElement(By.XPath("/html/body/div/div[@class='ns-box-inner']")).Text;

            Assert.AreEqual(expectedMsg, actualMsg, "Getting expected message failed");

            //Validate the skill
            Assert.IsFalse(skillsObj.ValidateSkills(skillName, skillLevel), "Delete skill failed");
        }
Exemplo n.º 5
0
        public void EditSkillnValidate()
        {
            //Read data from excel data file
            ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile->Skills");
            string skillName       = ExcelLib.ReadData(3, "SkillName");
            string skillLevel      = ExcelLib.ReadData(3, "SkillLevel");
            string editedSkillName = ExcelLib.ReadData(3, "SkillNameUpdate");

            //Edit skill
            ProfileSkills skillsobj = new ProfileSkills();

            skillsobj.ClickSkillsTab();
            skillsobj.EditSkill(skillName, skillLevel, editedSkillName);

            //Validate the message
            string expectedMsg = editedSkillName + " has been updated to your skills";
            string actualMsg   = Driver.FindElement(By.XPath("/html/body/div/div[@class='ns-box-inner']")).Text;

            Assert.AreEqual(expectedMsg, actualMsg, "Getting expected message failed");

            //Validate the skill
            Assert.IsTrue(skillsobj.ValidateSkills(editedSkillName, skillLevel), "Edit skill failed");
        }