コード例 #1
0
        public void SelectAvailabilityType()
        {
            GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//strong[text()='Availability']/../..//*[@class='right floated outline small write icon']", 5);
            Thread.Sleep(2000);
            string AvailabilityTypeValue = GlobalDefinitions.ExcelLib.ReadData(2, "Availability Type");

            if (AvailabilityTypeValue == "Full Time")
            {
                GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//strong[text()='Availability']/../..//*[@class='right floated outline small write icon']", 5);

                AvailabilityTypeEditButton.Click();
                HelperCallingMethods.SelectingDropdown(AvailabilityType, "SelectByText", GlobalDefinitions.ExcelLib.ReadData(2, "Availabilty Type"));

                //Validate message
                GlobalDefinitions.MessageValidation("Availability updated");
                Thread.Sleep(2000);
            }
            else if (AvailabilityTypeValue == "Part Time")
            {
                GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//strong[text()='Availability']/../..//*[@class='right floated outline small write icon']", 5);
                AvailabilityTypeEditButton.Click();
                HelperCallingMethods.SelectingDropdown(AvailabilityType, "SelectByText", GlobalDefinitions.ExcelLib.ReadData(2, "Availability Type"));

                //Validate message
                GlobalDefinitions.MessageValidation("Availability updated");
                Thread.Sleep(2000);
            }
        }
コード例 #2
0
        public void SelectAvailabilityHour()
        {
            //GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPathAddShareSkill, "Availability");
            GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//strong[text()='Hours']/../..//*[@class='right floated outline small write icon']", 5);

            string AvailabilityHourValue = GlobalDefinitions.ExcelLib.ReadData(2, "Availability Hour");

            if (AvailabilityHourValue == "Less than 30hours a week")
            {
                GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//strong[text()='Hours']/../..//*[@class='right floated outline small write icon']", 5);

                AvailabilityHourEditButton.Click();
                HelperCallingMethods.SelectingDropdown(AvailabilityHour, "SelectByText", GlobalDefinitions.ExcelLib.ReadData(2, "Availability Hour"));


                //Validate message
                GlobalDefinitions.MessageValidation("Availability updated");
                Thread.Sleep(2000);
            }
            else if (AvailabilityHourValue == "More than 30hours a week")
            {
                GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//strong[text()='Hours']/../..//*[@class='right floated outline small write icon']", 5);

                AvailabilityHourEditButton.Click();
                HelperCallingMethods.SelectingDropdown(AvailabilityHour, "SelectByText", GlobalDefinitions.ExcelLib.ReadData(2, "Availability Hour"));

                //Validate message
                GlobalDefinitions.MessageValidation("Availability updated");
                Thread.Sleep(2000);
            }

            else if (AvailabilityHourValue == "As needed")
            {
                GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//strong[text()='Hours']/../..//*[@class='right floated outline small write icon']", 5);

                AvailabilityHourEditButton.Click();
                HelperCallingMethods.SelectingDropdown(AvailabilityHour, "SelectByText", GlobalDefinitions.ExcelLib.ReadData(2, "Availabilty Hour"));

                //Validate message
                GlobalDefinitions.MessageValidation("Availability updated");
                Thread.Sleep(2000);
            }
        }
コード例 #3
0
        //Enter the Description in Profile Section
        internal void AddDescription()
        {
            //Clicking on Edit button
            GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//h3[text()='Description']//i[@class='outline write icon']", 6);
            EditDescription.Click();
            Thread.Sleep(1000);

            //Clearing the description textarea if any text already existing
            GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//textarea[@name='value']", 6);
            DescriptionTextBox.Clear();

            //Entering new description
            GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//textarea[@name='value']", 6);
            DescriptionTextBox.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ProfileDescription"));

            //Clicking on Save button
            GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//h3[text()='Description']/../..//button[text()='Save']", 6);
            SaveDescription.Click();
            string img = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "Profile Description");

            //Validate message
            GlobalDefinitions.MessageValidation("Description has been saved successfully");
        }
コード例 #4
0
        //
        internal void ChangePassword()
        {
            //Retrieving new password, confirm password and current passowrd value from excel
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ChangePassword");
            String CurrentPasswordValue = GlobalDefinitions.ExcelLib.ReadData(2, "Password");
            String NewPasswordValue     = GlobalDefinitions.ExcelLib.ReadData(2, "NewPassword");
            String ConfirmPasswordValue = GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPassword");

            //Moving curser to Userwelcom link
            Actions actions = new Actions(GlobalDefinitions.driver);

            Thread.Sleep(4000);
            GenericWait.ElementIsVisible(GlobalDefinitions.driver, "Xpath", "//span[contains(@class,'item ui dropdown link')]", 3);
            actions.MoveToElement(UserWelcomeLink).Build().Perform();

            //Clicking on the change password link
            GenericWait.ElementIsClickable(GlobalDefinitions.driver, "LinkText", "Change Password", 3);
            Thread.Sleep(2000);
            ChangePasswordLink.Click();

            //Entering the current password
            CurrentPasswordTextbox.SendKeys(CurrentPasswordValue);

            //Entering the new password
            NewPasswordTextbox.SendKeys(NewPasswordValue);

            //Entering the confirm password
            ConfirmPasswordTextbox.SendKeys(ConfirmPasswordValue);

            //clicking on the save button
            SaveButton.Click();

            string img = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "Change Password");

            //Validating message
            GlobalDefinitions.MessageValidation("Password Changed Successfully");
        }