コード例 #1
0
        internal void LanguageAdd()
        {
            // Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ProfilePage");

            //Explicit wait to click Add new element
            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("//a[@data-tab='first']"));

            //Click Language tab
            ClickLang.Click();

            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("//div[contains(text(),'Add New')][1]"));

            //Click Add new
            Addnewlang.Click();

            //Add Language
            AddLang.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Language"));

            //Add Level
            SelectLevel.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Level"));

            //Save Language
            SaveLang.Click();
        }
コード例 #2
0
        public void Addlanguagedetails()

        {
            //Click on "Add New" button for Adding language
            Addnewlang.Click();


            //Send the data to the "Add Language" textbox
            LanguageAdd.SendKeys("Chinese and Russian");

            //Click on the "Choose Language Level", and Select option "Fluent"
            IWebElement   Languagelevel    = Driver.driver.FindElement(By.XPath("//select[@name='level']"));
            SelectElement Languagelevel_dd = new SelectElement(Languagelevel);

            Languagelevel_dd.SelectByValue("Fluent");


            //Click on the "Add" button after adding details in language tab
            LanguageAddFinButn.Click();
        }