Exemple #1
0
        public void EditSkill(string SkillName, String SkillType, String NewSkillName)
        {
            if (Driver.WaitUntilElementisDisplayed(ByMethods.Select_EditFor_SkillName(SkillName), 5))
            {
                Driver.WebDriver.FindElement(ByMethods.Select_EditFor_SkillName(SkillName)).Click();

                Console.WriteLine("Selected the Edit Button for Skill Name" + SkillName);

                // Update the Skill Name

                Driver.WebDriver.FindElement(Skill_name).Clear();
                Driver.WebDriver.FindElement(Skill_name).SendKeys(NewSkillName);
                Console.WriteLine("Updated the Skill name from " + SkillName + " to " + NewSkillName);


                ByMethods.SelectDropdownByValue(Driver.WebDriver.FindElement(Skill_type), SkillType);
                Driver.WaitUntilElementisClickable(ByMethods.SelectButton("Update"), 15);
                Driver.WebDriver.FindElement(ByMethods.SelectButton("Update")).Click();

                Console.WriteLine("Clicked the Update Button");
                System.Threading.Thread.Sleep(2000);
            }
            else
            {
                Console.WriteLine("Skill not found where Skill Name is " + SkillName);
            }
        }
Exemple #2
0
        public void AddSkill(string SkillName, String SkillType)
        {
            Driver.WebDriver.FindElement(By.XPath("//div[@data-tab='second']//div[.='Add New']")).Click();
            Console.WriteLine("Selected the Add New Button");
            System.Threading.Thread.Sleep(2000);

            Driver.WebDriver.FindElement(Skill_name).SendKeys(SkillName);
            Console.WriteLine("Added the Skill as " + SkillName);
            // System.Threading.Thread.Sleep(2000);

            ByMethods.SelectDropdownByValue(Driver.WebDriver.FindElement(Skill_type), SkillType);


            Driver.WaitUntilElementisClickable(ByMethods.SelectButton("Add"), 15);
            Driver.WebDriver.FindElement(ByMethods.SelectButton("Add")).Click();

            Console.WriteLine("Clicked the Add Button");
            System.Threading.Thread.Sleep(2000);
        }