public void AddSkill() { //initialize excel sheet by calling the ExcelLib GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "AddShareSkill"); ShareSkillTab.Click(); //GlobalDefinitions.wait(10); //wait for Title GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("//input[@name='title']"), 10); AddTitle.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Title")); AddDescription.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Description")); AddCategory.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Category")); AddSubCategory.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Sub Category")); AddTags.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Tags")); //will perform the enter button's functionality enterBtn.SendKeys(Keys.Return).Perform(); // AddTags.SendKeys(Keys.Enter); AddServiceOneOff.Click(); AddLocationOnline.Click(); AvailableStartDate.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Start Date")); AvailableEndDate.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "End Date")); AvailableDays.Click(); AvailableStartTime.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Start Time")); AvailableEndTime.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "End Time")); TradeSKillExchange.Click(); SKillExchangeTag.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Skill Exchange Tage")); //will perform the enter button's functionality enterBtn.SendKeys(Keys.Return).Perform(); //Thread.Sleep(2000); //find work sample icon and click AddWorkSample.Click(); Process.Start(@"V:\marsframework-master\marsframework-master\Upload.exe"); // Uploading File path //var GetCurrentDirectory = Directory.GetCurrentDirectory(); //String path = GetCurrentDirectory + @"\MarsFramework\Upload Files\Samplework.txt"; //AddWorkSample.SendKeys(path); //AddWorkSample.SendKeys("file path"); //GlobalDefinitions.wait(10); //Thread.Sleep(5000); SelectActive.Click(); //Thread.Sleep(5000); SaveSkill.Click(); }
public void EditExistingSkill() { //initialize excel sheet by calling the ExcelLib GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "EditSkill"); ManageListinTab.Click(); EditSkillIcon.Click(); UpdateTitle.Clear(); UpdateTitle.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Title")); AddDescription.Clear(); AddDescription.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Description")); AddTags.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Tags")); enterBtn.SendKeys(Keys.Return).Perform(); AvailableDays.Click(); AvailableStartTime.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Start Time")); AvailableEndTime.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "End Time")); SaveSkill.Click(); //GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("//div[@class='ns-box ns-growl ns-effect-jelly ns-type-success ns-show']/div"), 10); }
public void EnterMechanicBusinessAbsenceDetails() { if (NoneinMechanicAbsencePage.Selected) { CustomWait.FluentWaitbyXPath("addMechanicBusinessAbsenceBtn"); addMechanicBusinessAbsenceBtn.Click(); IJavaScriptExecutor js = (IJavaScriptExecutor)Drive.driver; js.ExecuteScript("document.getElementById('AbsenceStartDate').value ='20.3.2021 20:25'"); // id has been mentioned into the code of Start date field CustomWait.WaitFortheLoadingIconDisappear2000(); js.ExecuteScript("document.getElementById('AbsenceEndDate').value ='21.3.2021 20:25'"); // id has been mentioned into the code of End date field CustomWait.WaitFortheLoadingIconDisappear2000(); AddDescription.SendKeys("Business absence at Monday and Wednesday"); Hardwareworking.Hover(saveMechanicBusinessAbsenceBtn); CustomWait.WaitFortheLoadingIconDisappear2000(); } //else if(TypeWeeklyinMechanicAbsencePage.Selected) //{ //} }