Exemplo 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()
        {
            //Global.GlobalDefinitions.wait(20000);
            //Populate the Excel Sheet
            //GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile");


            //Click on Edit button
            AvailabilityTimeEdit.Click();
            //Select
            AvailabilityTime.Click();
            //Availability option Full Time
            AvailabilityTimeOpt.Click();
            CommonMethods.test.Log(LogStatus.Info, "Availability updated");
            Console.WriteLine("Availability updated");



            /* // 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();
             *        CommonMethods.test.Log(LogStatus.Info, "Select the available time");
             *        Console.WriteLine(AvailableTime[i].Text);
             *        Console.WriteLine(count);
             *
             *    }
             * }*/
            Thread.Sleep(2000);
            //Availability Edit
            AvailabilityHoursEdit.Click();
            // Availability Hours option
            AvailabilityHoursDropDown.Click();
            //AvailabilityHours ASNeeded
            AvailabilityHours.Click();
            CommonMethods.test.Log(LogStatus.Info, "Hours updated");
            Console.WriteLine("Hours updated");

            //Salary
            SalaryEdit.Click();
            //Choose the option from salary dropdown
            SalaryDropdown.Click();
            //SalaryOpt-More than 1000 per month
            SalaryOpt.Click();
            CommonMethods.test.Log(LogStatus.Info, "Earn Target updated");
            Console.WriteLine("Earn Target updated");



            //---------------------------------------------------------
            //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();
            CommonMethods.test.Log(LogStatus.Info, "Added Language successfully");
            Console.WriteLine("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();

            CommonMethods.test.Log(LogStatus.Info, "Added Skills successfully");
            Console.WriteLine("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();

            CommonMethods.test.Log(LogStatus.Info, "Added Education successfully");
            Console.WriteLine("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();

            CommonMethods.test.Log(LogStatus.Info, "Added Certificate successfully");
            Console.WriteLine("Added Certificate successfully");

            //-----------------------------------------------------
        }