Exemplo n.º 1
0
        internal void AddNewSkill()
        {
            //Click Skill
            AddSkill.Click();

            //Click on Add New Skill Button
            AddNewSkillBtn.Click();

            //Enter the skill
            AddSkillText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Skill"));

            //Click the skill dropdown
            ChooseSkill.Click();
            Thread.Sleep(500);

            ChooseSkilllevel.Click();
            SaveSkillBtn.Click();
            Thread.Sleep(500);
            Base.test.Log(LogStatus.Info, "Added Skills successfully");
        }
Exemplo n.º 2
0
        internal void Add_Skills()
        {
            //read data from the excel
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "AddSkills");
            Thread.Sleep(2000);

            // look up if there is a repeated data

            NewSkillPage.Click();
            //add a new skill
            GlobalDefinitions.WaitForElement(Global.GlobalDefinitions.driver, "XPath", AddNewSkillBtn.Text, 2000);
            AddNewSkillBtn.Click();
            AddSkillText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Skill"));
            ChooseSkill.Click();
            var chooseSkillOpt = new SelectElement(ChooseSkill);

            chooseSkillOpt.SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "Level"));
            AddSkill.Click();
            Thread.Sleep(1000);
            //close the pop up window
            GlobalDefinitions.driver.FindElement(By.XPath("//a[@href ='#']")).Click();
        }
Exemplo n.º 3
0
        public void EditSkills()
        {
            Global.ExcelLib.PopulateInCollection(Base.ExcelPath, "AddSkills");

            GlobalDefinitions.Wait();
            SkillLink.Click();

            //This list gets the number of rows from the table
            //IList<IWebElement> rows = GlobalDefinitions.driver.FindElements(By.XPath(".//tr"));

            //This loop finds the first row which' title matches sRowValue
            IList <IWebElement> rows = GlobalDefinitions.driver.FindElements(By.XPath(".//tr"));

            //This loop finds the first row which' title matches sRowValue
            for (int i = 1; i < rows.Count; i++)
            {
                String sValue = GlobalDefinitions.driver.FindElement(By.XPath("//td[contains(text(),'C#')]")).Text;
                if (sValue == ExcelLib.ReadData(2, "Skill"))
                {
                    IWebElement Edit = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='ui bottom attached tab segment tooltip-target active']//tbody[1]//tr[1]//td[3]//span[1]//i[1]"));
                    Edit.Click();
                    AddSkillText.Clear();
                    AddSkillText.SendKeys(ExcelLib.ReadData(7, "Skill"));
                    UpdateSkill.Click();
                    break;
                }
            }
            GlobalDefinitions.Wait();
            IWebElement AddAlertPopup = GlobalDefinitions.driver.FindElement(By.ClassName("ns-box-inner"));
            String      AlertText     = AddAlertPopup.Text;

            GlobalDefinitions.Wait();
            Assert.IsTrue(AlertText.Contains("updated"));
            Console.WriteLine(AlertText);
            //saving screenshot
            var ScreenshotPath = Global.SaveScreenshot.SaveScreenshotClass(GlobalDefinitions.driver, "Edit is successful");
        }
        internal void EditProfile()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            Thread.Sleep(1000);

            //Click on Edit button
            ProfileEdit.Click();

            //User's First Name
            FirstName.Clear();
            FirstName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "FirstName"));

            //User's Last Name
            LastName.Clear();
            LastName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "LastName"));

            //Save User's Details
            SaveUserDetails.Click();

            //Availability Time option
            Thread.Sleep(1500);
            AvailabilityTime.Click();
            AvailabilityTimeOpt.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "AvailableTime"));


            //Availability Hours
            Thread.Sleep(2000);
            AvailabilityHours.Click();
            //Availability Hours option
            Availability.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Hours"));

            //Earn Target
            Thread.Sleep(2000);
            EarnTarget.Click();
            selectTarget.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "EarnTarget"));

            //-----------------------------------------------------

            //IJavaScriptExecutor js = GlobalDefinitions.driver as IJavaScriptExecutor;
            //Thread.Sleep(1000);
            //js.ExecuteScript("window.scrollBy(0,100);");
            //Thread.Sleep(1000);


            //---------------------------------------------------------
            //Click on Add New Language button
            AddNewBtn.Click();
            Thread.Sleep(1000);
            //Enter the Language
            AddLangText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Language"));

            //Choose Language
            ChooseLangLevel.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Level"));
            Thread.Sleep(1000);
            AddLang.Click();
            Base.test.Log(LogStatus.Info, "Added Language successfully");

            //-----------------------------------------------------------
            //Click on Add New Skill Button
            SkillTab.Click();
            AddNewSkillBtn.Click();
            //Enter the skill
            AddSkillText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Skill"));

            //Click the skill dropdown
            ChooseSkilllevel.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "SkillsLevel"));
            Thread.Sleep(500);
            //ChooseSkilllevel.Click();
            AddSkill.Click();
            Thread.Sleep(500);
            Base.test.Log(LogStatus.Info, "Added Skills successfully");

            //---------------------------------------------------------
            //Add Education
            EducationTab.Click();
            AddNewEducation.Click();
            //Enter the University
            EnterUniversity.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "University"));

            //Choose Country
            ChooseCountry.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Country"));
            Thread.Sleep(500);


            //Choose Title
            ChooseTitle.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Title"));
            Thread.Sleep(500);


            //Enter Degree
            Degree.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Degree"));

            //Year of Graduation
            DegreeYear.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "GraduateYear"));
            Thread.Sleep(500);

            AddEdu.Click();
            Thread.Sleep(500);
            Base.test.Log(LogStatus.Info, "Added Education successfully");

            //-------------------------------------------------
            //Click on Certificate tab
            CertiTab.Click();

            //Click on add new
            AddNewCertibtn.Click();

            //Enter Certificate Name
            CertiName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Certificate"));

            //Enter Certified from
            CertiFrom.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "CertifiedFrom"));

            //Enter the Year
            CertiYear.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "CerYear"));;
            Thread.Sleep(500);

            //Click Add new
            AddCerti.Click();
            Thread.Sleep(500);
            Base.test.Log(LogStatus.Info, "Added Certificate successfully");

            //-------------------------------------------------------------------------------
            //Add Description ICON
            DescrIco.Click();

            //Enter description
            Description.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Description"));
            Thread.Sleep(500);

            //Click on Save
            Save.Click();
            Base.test.Log(LogStatus.Info, "Added Description successfully");
        }
        internal void EditProfile()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            Thread.Sleep(1000);

            //Click on Edit button
            ProfileEdit.Click();

            //Availability Time option
            Thread.Sleep(1500);
            Actions action = new Actions(GlobalDefinitions.driver);

            action.MoveToElement(AvailabilityTime).Build().Perform();
            Thread.Sleep(1000);
            IList <IWebElement> AvailableTime = AvailabilityTimeOpt.FindElements(By.TagName("div"));
            int count = AvailableTime.Count;

            for (int i = 0; i < count; i++)
            {
                if (AvailableTime[i].Text == GlobalDefinitions.ExcelLib.ReadData(2, "AvailableTime"))
                {
                    AvailableTime[i].Click();
                    Base.test.Log(LogStatus.Info, "Select the available time");
                }
            }

            //Availability Hours
            AvailabilityHours.Click();
            //Availability Hours option
            AvailabilityHours.SendKeys(Keys.ArrowDown);
            AvailabilityHours.SendKeys(Keys.Enter);

            //Salary
            Salary.Click();
            //Choose the option from salary dropdown
            Salary.SendKeys(Keys.ArrowDown);
            Thread.Sleep(500);
            Salary.SendKeys(Keys.Enter);

            //Choose Location
            Thread.Sleep(1000);
            action.MoveToElement(Location).Build().Perform();
            Thread.Sleep(1000);
            IList <IWebElement> LocCountry = LocationOpt.FindElements(By.TagName("div"));
            int countrycount = LocCountry.Count;

            for (int i = 0; i < countrycount; i++)
            {
                if (LocCountry[i].Text == GlobalDefinitions.ExcelLib.ReadData(2, "Country"))
                {
                    LocCountry[i].Click();
                    Base.test.Log(LogStatus.Info, "Selected Country");
                }
            }

            //Choose City
            Thread.Sleep(1000);
            action.MoveToElement(City).Build().Perform();
            Thread.Sleep(1000);
            IList <IWebElement> LocCity = CityOpt.FindElements(By.TagName("div"));
            int citycount = LocCity.Count;

            for (int i = 0; i < citycount; i++)
            {
                if (LocCity[i].Text == GlobalDefinitions.ExcelLib.ReadData(2, "City"))
                {
                    LocCity[i].Click();
                    Base.test.Log(LogStatus.Info, "Selected City");
                }
            }


            //---------------------------------------------------------
            //Click on Add New Language button
            AddNewLangBtn.Click();
            Thread.Sleep(1000);
            //Enter the Language
            AddLangText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Language"));

            //Choose Lang
            ChooseLang.Click();
            Thread.Sleep(1000);
            ChooseLangOpt.Click();
            Thread.Sleep(500);
            AddLang.Click();
            Base.test.Log(LogStatus.Info, "Added Language successfully");

            //-----------------------------------------------------------
            //Click on Add New Skill Button
            AddNewSkillBtn.Click();
            //Enter the skill
            AddSkillText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Skill"));

            //Click the skill dropdown
            ChooseSkill.Click();
            Thread.Sleep(500);
            ChooseSkilllevel.Click();
            AddSkill.Click();
            Thread.Sleep(500);
            Base.test.Log(LogStatus.Info, "Added Skills successfully");

            //---------------------------------------------------------
            //Add Education
            AddNewEducation.Click();
            //Enter the University
            EnterUniversity.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "University"));

            //Choose Country
            ChooseCountry.Click();
            Thread.Sleep(500);
            //Choose Country Level
            ChooseCountryOpt.Click();

            //Choose Title
            ChooseTitle.Click();
            Thread.Sleep(500);
            ChooseTitleOpt.Click();

            //Enter Degree
            Degree.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Degree"));

            //Year of Graduation
            DegreeYear.Click();
            Thread.Sleep(500);
            DegreeYearOpt.Click();
            AddEdu.Click();
            Thread.Sleep(500);
            Base.test.Log(LogStatus.Info, "Added Education successfully");

            //-------------------------------------------------
            //Add new Certificate
            AddNewCerti.Click();

            //Enter Certificate Name
            EnterCerti.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Certificate"));

            //Enter Certified from
            CertiFrom.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "CertifiedFrom"));

            //Enter the Year
            CertiYear.Click();
            Thread.Sleep(500);
            CertiYearOpt.Click();
            AddCerti.Click();
            Thread.Sleep(500);
            Base.test.Log(LogStatus.Info, "Added Certificate successfully");

            //-----------------------------------------------------
            //Add Description
            Description.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Description"));
            Thread.Sleep(500);
            Save.Click();
            Base.test.Log(LogStatus.Info, "Added Description successfully");
        }
Exemplo n.º 6
0
        internal void EditProfile()
        {
            Global.GlobalDefinitions.wait(60000);
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");


            //Click on Edit button
            AvailabilityTimeEdit.Click();
            AvailabilityTime.Click();
            AvailabilityTimeOpt.Click();

            //Availability Time option

            // Actions action = new Actions(GlobalDefinitions.driver);
            // action.MoveToElement(AvailabilityTime).Build().Perform();
            Thread.Sleep(1000);
            //IList<IWebElement> AvailableTime = AvailabilityTimeOpt.FindElements(By.TagName("div"));
            IList <IWebElement> AvailableTime = GlobalDefinitions.driver.FindElements(By.XPath("//select[@name='availabiltyType']/option"));
            int count = AvailableTime.Count;

            for (int i = 0; i < count; i++)
            {
                if (AvailableTime[i].Text == GlobalDefinitions.ExcelLib.ReadData(2, "AvailableTime"))
                {
                    AvailableTime[i].Click();
                    Base.test.Log(LogStatus.Info, "Select the available time");
                    Console.WriteLine(AvailableTime[i].Text);
                    Console.WriteLine(count);
                }
            }

            //Availability Edit
            AvailabilityHoursEdit.Click();
            //Availability Hours option
            AvailabilityHoursDropDown.Click();
            AvailabilityHours.Click();

            //Salary
            SalaryEdit.Click();
            //Choose the option from salary dropdown
            SalaryDropdown.Click();

            SalaryOpt.Click();



            //---------------------------------------------------------
            //Click on Add New Language button
            AddNewLangBtn.Click();

            //Enter the Language
            AddLangText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Language"));

            //Choose Lang
            ChooseLang.Click();

            ChooseLangOpt.Click();

            AddLang.Click();
            Base.test.Log(LogStatus.Info, "Added Language successfully");

            //-----------------------------------------------------------

            //Click on Skill Button
            SkillBtn.Click();

            //Click on Add New Skill Button
            AddNewSkillBtn.Click();

            //Enter the skill
            AddSkillText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Skill"));

            //Click the skill dropdown
            ChooseSkill.Click();

            ChooseSkilllevel.Click();

            AddSkill.Click();

            Base.test.Log(LogStatus.Info, "Added Skills successfully");

            //---------------------------------------------------------
            //Click on Education Tab
            EduBtn.Click();
            //Add Education
            AddNewEducation.Click();
            //Enter the University
            EnterUniversity.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "University"));

            //Choose Country
            ChooseCountry.Click();

            //Choose Country Level
            ChooseCountryOpt.Click();

            //Choose Title
            ChooseTitle.Click();

            ChooseTitleOpt.Click();

            //Enter Degree
            Degree.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Degree"));

            //Year of Graduation
            DegreeYear.Click();

            DegreeYearOpt.Click();
            AddEdu.Click();

            Base.test.Log(LogStatus.Info, "Added Education successfully");

            //-------------------------------------------------
            //Click on Certificates Tab
            CertiBtn.Click();
            //Add new Certificate
            AddNewCerti.Click();

            //Enter Certificate Name
            EnterCerti.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Certificate"));

            //Enter Certified from
            CertiFrom.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "CertifiedFrom"));

            //Enter the Year
            CertiYear.Click();

            CertiYearOpt.Click();
            AddCerti.Click();

            Base.test.Log(LogStatus.Info, "Added Certificate successfully");

            //-----------------------------------------------------
        }
Exemplo n.º 7
0
        public void AddSkills()
        {
            //Populate the Excel Sheet
            Global.ExcelLib.PopulateInCollection(Base.ExcelPath, "AddSkills");
            GlobalDefinitions.Wait();
            SkillLink.Click();

            //loop for multiple properties getting added at single shot
            int loopNum = Base.RowCount + 2;

            for (int rowNum = 2; rowNum <= loopNum; rowNum++)
            {
                GlobalDefinitions.Wait();
                AddNewSkillBtn.Click();
                AddSkillText.SendKeys(ExcelLib.ReadData(rowNum, "Skill"));

                //ChooseLang.SendKeys(ExcelLib.ReadData(2, "ChooseLangLevel"));
                ChooseSkill.Click();
                IWebElement   SkillLevelDrpdwn = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='ui bottom attached tab segment tooltip-target active']//select[@name='level']"));
                SelectElement chooseSkillLevel = new SelectElement(SkillLevelDrpdwn);
                //select.SelectByText(ConstantHelpers.LevelFluent);
                var SkillLevelData = ExcelLib.ReadData(rowNum, "ChooseSkillLevel");
                chooseSkillLevel.SelectByValue(SkillLevelData);

                AddSkill.Click();
                //GlobalDefinitions.Wait();
            }
            //saving screenshot
            var ScreenshotPath = Global.SaveScreenshot.SaveScreenshotClass(GlobalDefinitions.driver, "Adding is successful");
            //Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Skills added successfully");
            String ActualSkill = GlobalDefinitions.driver.FindElement(By.XPath("//td[contains(text(),'C#')]")).Text;

            Assert.AreEqual(ActualSkill, ExcelLib.ReadData(2, "Skill"));
            Console.WriteLine("Skill" + " " + ActualSkill + " " + "is added");
            GlobalDefinitions.Wait();

            String ActualSkill1 = GlobalDefinitions.driver.FindElement(By.XPath("//td[contains(text(),'POM')]")).Text;

            Assert.AreEqual(ActualSkill1, ExcelLib.ReadData(3, "Skill"));
            Console.WriteLine("Skill" + " " + ActualSkill1 + " " + "is added");
            GlobalDefinitions.Wait();

            String ActualSkill2 = GlobalDefinitions.driver.FindElement(By.XPath("//td[contains(text(),'Nunit')]")).Text;

            Assert.AreEqual(ActualSkill2, ExcelLib.ReadData(4, "Skill"));
            Console.WriteLine("Skill" + " " + ActualSkill2 + " " + "is added");
            //Reading Language Level from Data excel sheet



            //Asserting the Skill level
            String ActualLevel = GlobalDefinitions.driver.FindElement(By.XPath("//td[contains(text(),'Intermediate')]")).Text;

            Assert.AreEqual(ActualLevel, ExcelLib.ReadData(2, "ChooseSkillLevel"));
            Console.WriteLine("Level" + " " + ActualLevel + " " + "is added");
            GlobalDefinitions.Wait();

            String ActualLevel1 = GlobalDefinitions.driver.FindElement(By.XPath("//td[contains(text(),'Expert')]")).Text;

            Assert.AreEqual(ActualLevel1, ExcelLib.ReadData(3, "ChooseSkillLevel"));
            Console.WriteLine("Level" + " " + ActualLevel1 + " " + "is added");
            GlobalDefinitions.Wait();

            String ActualLevel2 = GlobalDefinitions.driver.FindElement(By.XPath("//td[contains(text(),'Expert')]")).Text;

            Assert.AreEqual(ActualLevel2, ExcelLib.ReadData(4, "ChooseSkillLevel"));
            Console.WriteLine("Level" + " " + ActualLevel2 + " " + "is added");
        }
Exemplo n.º 8
0
        internal void EditProfile()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollections(Base.ExcelPath, "Profile");

            GlobalDefinitions.wait(60);

            //builder.MoveToElement(HoursEdit).Build().Perform();
            AvailabilityEdit.Click();
            HoursEdit.Click();
            EarnTargetEdit.Click();

            AvailabilityDropDown.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "AvailableTime"));
            HoursDropDown.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Hours"));
            EarnTargetDropDown.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "EarnTarget"));


            //---------------------------------------------------------
            #region Languages
            //Click on Add New Language button
            AddNewLangBtn.Click();

            GlobalDefinitions.wait(20);

            //Enter the Language
            AddLangText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Language"));

            //Choose Language Level
            ChooseLang.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "LanguageLevel"));
            ChooseLang.Click();

            AddLang.Click();

            GlobalDefinitions.wait(10);

            Base.test.Log(LogStatus.Info, "Added Language successfully");

            #endregion
            //-----------------------------------------------------------
            #region Skills

            //Click on Skill Tab
            SkillTab.Click();

            //Click on Add New Skill Button
            AddNewSkillBtn.Click();

            GlobalDefinitions.wait(20);

            //Enter the skill
            AddSkillText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Skill"));

            //Click the skill dropdown
            ChooseSkill.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "SkillLevel"));
            ChooseSkill.Click();

            //Click Add button
            AddSkill.Click();

            GlobalDefinitions.wait(10);

            Base.test.Log(LogStatus.Info, "Added Skills successfully");

            #endregion
            //---------------------------------------------------------
            #region Education

            //EducationTab
            Educationtab.Click();

            //Add Education
            AddNewEducation.Click();

            GlobalDefinitions.wait(20);

            //Enter the University
            EnterUniversity.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "University"));

            //Choose Country
            ChooseCountry.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Country"));
            ChooseCountry.Click();

            GlobalDefinitions.wait(10);

            //Choose Title
            ChooseTitle.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Title"));
            ChooseTitle.Click();

            GlobalDefinitions.wait(10);

            //Enter Degree
            Degree.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Degree"));

            //Year of Graduation
            DegreeYear.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "GraduationYear"));
            DegreeYear.Click();

            GlobalDefinitions.wait(10);

            //Click Add Button
            AddEdu.Click();

            GlobalDefinitions.wait(10);

            Base.test.Log(LogStatus.Info, "Added Education successfully");

            #endregion
            //-------------------------------------------------
            #region Certification

            //CertificationTab
            CertificationTab.Click();

            //Add new Certificate
            AddNewCerti.Click();

            //Enter Certificate Name
            EnterCerti.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Certification"));

            //Enter Certified from
            CertiFrom.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Certified From"));

            //Enter the Year
            CertiYear.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "CertYear"));
            CertiYear.Click();

            GlobalDefinitions.wait(10);

            AddCerti.Click();

            GlobalDefinitions.wait(10);

            Base.test.Log(LogStatus.Info, "Added Certificate successfully");

            #endregion
            //-----------------------------------------------------
            #region Description

            //Add Description
            DescriptionEdit.Click();

            GlobalDefinitions.wait(100);

            DescriptionWrite.Click();

            GlobalDefinitions.wait(120);

            DescriptionWrite.Clear();

            GlobalDefinitions.wait(60);

            DescriptionWrite.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Description"));

            GlobalDefinitions.wait(30);

            Save.Click();

            Base.test.Log(LogStatus.Info, "Added Description successfully");

            #endregion
        }
Exemplo n.º 9
0
        internal void AddLanguageAndSkill()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");
            Thread.Sleep(1000);

            //---------------------------------------------------------
            //Click on Language Tab
            LanguageTab.Click();
            //Click on Add New Language button
            AddNewLangBtn.Click();
            //Enter the Language
            AddLangText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Language"));
            Assert.That(AddLangText != null);
            try
            {
                var Lang = GlobalDefinitions.driver.FindElement(By.XPath("//td[contains(text(),'Japanese')]")).Text;
                if (Lang == "Japanese")
                {
                    // Base.test.Log(LogStatus.Info, "Language is already Exist!");
                    Assert.Fail("Language is already Exist!");
                }
            }
            catch (Exception)
            {
                Base.test.Log(LogStatus.Info, "Can not find the Language ");
            }
            //Choose LanguageLevel
            ChooseLang.Click();
            ChooseLang.SendKeys(Keys.ArrowDown + Keys.ArrowDown + Keys.Enter);
            //Click on Add Button in Language Tab
            AddLang.Click();
            Base.test.Log(LogStatus.Info, "Added Language successfully");

            //-----------------------------------------------------------
            //Click on Skill Tab
            SkillTab.Click();
            //Click on Add New Skill Button
            AddNewSkillBtn.Click();
            //Enter the skill
            AddSkillText.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Skill"));
            Assert.That(AddSkillText != null);
            try
            {
                var Skill = GlobalDefinitions.driver.FindElement(By.XPath("//td[contains(text(),'Automation Testing')]")).Text;
                if (Skill == "Automation Testing")
                {
                    // Base.test.Log(LogStatus.Info, "Language is already Exist!");
                    Assert.Fail("Skill is already Exist!");
                }
            }
            catch (Exception)
            {
                Base.test.Log(LogStatus.Info, "Can not find the Language ");
            }
            //Click the skill dropdown
            ChooseSkill.Click();
            ChooseSkill.SendKeys(Keys.ArrowDown + Keys.ArrowDown + Keys.Enter);
            //Click on Add Button in Skill Tab
            AddSkill.Click();
            Base.test.Log(LogStatus.Info, "Added Skills successfully");
        }