Esempio n. 1
0
        internal void EditAvailability()
        {
            // Availability time edit
            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("(//i[contains(@class,'right floated outline small write icon')])[1]"), 10);
            AvailabilityTimeEdit.Click();
            AvailabilityTime.Click();
            AvailabilityTimeOpt.Click();

            //Availability Hour Edit
            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("(//i[@class='right floated outline small write icon'])[2]"), 10);
            AvailabilityHoursEdit.Click();
            AvailabilityHours.Click();
            AvailabilityHoursOpt.Click();

            // Earn Target edit
            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("(//i[@class='right floated outline small write icon'])[3]"), 10);
            EarnTargetEdit.Click();
            EarnTargetDropdown.Click();
            EarnTargetOpt.Click();
        }
        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
        }