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();
        }
Beispiel #2
0
        internal void Edit_Availability_Hours_Earn_Target()
        {
            //edit availability
            Thread.Sleep(2000);
            GlobalDefinitions.WaitForElement(Global.GlobalDefinitions.driver, "XPath", AvailabilityTimeEdit.Text, 2000);
            AvailabilityTimeEdit.Click();
            GlobalDefinitions.WaitForElement(Global.GlobalDefinitions.driver, "Name", AvailabilityTime.Text, 2000);
            AvailabilityTime.Click();
            var selectTime = new SelectElement(AvailabilityTime);

            selectTime.SelectByText("Full Time");

            //edit the hours
            GlobalDefinitions.WaitForElement(Global.GlobalDefinitions.driver, "XPath", AvailabilityHours.Text, 2000);
            AvailabilityHours.Click();
            GlobalDefinitions.WaitForElement(Global.GlobalDefinitions.driver, "Name", AvailabilityHoursOpt.Text, 2000);
            AvailabilityHoursOpt.Click();
            var selectHours = new SelectElement(AvailabilityHoursOpt);

            selectHours.SelectByText("As needed");

            //edit Earn Target
            GlobalDefinitions.WaitForElement(Global.GlobalDefinitions.driver, "XPath", Salary.Text, 2000);
            Salary.Click();
            GlobalDefinitions.WaitForElement(Global.GlobalDefinitions.driver, "Name", SalaryOpt.Text, 2000);
            SalaryOpt.Click();
            var selectSelary = new SelectElement(SalaryOpt);

            selectSelary.SelectByText("More than $1000 per month");

            //edit desciption
            GlobalDefinitions.WaitForElement(Global.GlobalDefinitions.driver, "XPath", Description.Text, 2000);
            Description.Click();
            DescriptionTextArea.Click();
            DescriptionTextArea.Clear();
            DescriptionTextArea.SendKeys("A good tester. That is me!");
            DesSave.Click();
            Thread.Sleep(2000);
            //close the pop up window
            GlobalDefinitions.driver.FindElement(By.XPath("//a[@href ='#']")).Click();
        }