internal void EditProfile() { //Populate the Excel Sheet Global.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile"); GlobalDefinitions.Wait(); EditProfileicon.Click(); EditFirstName.Clear(); EditFirstName.SendKeys(ExcelLib.ReadData(2, "FirstName")); EditLasttName.Clear(); EditLasttName.SendKeys(ExcelLib.ReadData(2, "LastName")); ProfileSaveBtn.Click(); GlobalDefinitions.driver.Navigate().Refresh(); GlobalDefinitions.Wait(); Availability.Click(); AvailabilityTime.SendKeys(ExcelLib.ReadData(2, "Availability")); Hours.Click(); AvailabilityHour.SendKeys(ExcelLib.ReadData(2, "SelectHours")); GlobalDefinitions.Wait(); EarnTarget.Click(); AvailabilityTarget.SendKeys(ExcelLib.ReadData(2, "EarnTraget")); GlobalDefinitions.Wait(); DescriptionBtn.Click(); TxtDescription.Clear(); GlobalDefinitions.Wait(); TxtDescription.SendKeys(ExcelLib.ReadData(2, "EditDesc")); DesSaveButton.Click(); }
internal void earntarget() { // Populate the excel data GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ProfilePage"); GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("(//i[@class='right floated outline small write icon'])[3]")); //Click EarnTarget EarnTarget.Click(); // Select on Category Dropdown EarnTarget GlobalDefinitions.wait(50); SelectElement Earn = new SelectElement(SelectEarntarget); Earn.SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "EarnTarget")); //Assert EarnTarget GlobalDefinitions.wait(40); Assert.AreEqual(EarnT.Text, GlobalDefinitions.ExcelLib.ReadData(2, "EarnTarget")); }
public void UpdateEarnTarget() { EarnTarget.Click(); Thread.Sleep(1000); string OptionNo = GlobalDefinitions.ExcelLib.ReadData(2, "EarnTarget"); if (OptionNo.Equals("1")) { EarnTargetOpt1.Click(); } else if (OptionNo.Equals("2")) { EarnTargetOpt2.Click(); } else { EarnTargetOpt3.Click(); } Thread.Sleep(500); }
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"); }
public void ClickEarnTarget() { Base.driver.WaitForClickableElement(By.XPath("//div[@class='extra content']/descendant::div[8]/div[@class='right floated content']/span/i")); EarnTarget.Click(); }