public void AddModal(string ModalTitle) { if (ModalTitle == "Add Package") { AddPackageOkBtn.Click(); CustomLib.AlertMessage(); } else if (ModalTitle == "Add Service") { AddServiceOkBtn.Click(); CustomLib.AlertMessage(); } else if (ModalTitle == "Add Operation") { AddOperationSaveBtn.Click(); CustomLib.AlertMessage(); } else if (ModalTitle == "Add Material") { AddMaterialOkBtn.Click(); CustomLib.AlertMessage(); } else if (ModalTitle == "Add AOP") { AddAOPOkBtn.Click(); CustomLib.AlertMessage(); } }
public void AppointmentCreateOrSelectBooking(string SelectOption, string NewLPNo = null) { if (SelectOption == active) { CustomWait.WaitFortheLoadingIconDisappear5000(); Console.WriteLine(OpenActiveModalTitle.Text); int ActiveRowCount = Drive.driver.FindElements(By.XPath(OpenActiveBookingCount)).Count(); Console.WriteLine(OpenActiveModalTitle.Text + ':' + ActiveRowCount); CustomWait.WaitFortheLoadingIconDisappear3000(); SelectExistBooking.Click(); } else if (SelectOption == New) { CustomWait.WaitFortheLoadingIconDisappear3000(); CloseActiveBooking.Click(); int VehicleRowCount = Drive.driver.FindElements(By.XPath(VehicleTableCount)).Count(); string BeforeVehicle = "((//div[contains(text(),'"; string AfterVehicle = "')])/parent::td[contains(@data-th,'License')])/parent::*/td[@data-th='Actions']"; for (int i = 1; i <= VehicleRowCount; i++) { string ActualRowData = BeforeVehicle + NewLPNo + AfterVehicle; IWebElement FinalVehicleData = Drive.driver.FindElement(By.XPath(ActualRowData)); ((IJavaScriptExecutor)Drive.driver).ExecuteScript("arguments[0].scrollIntoView(true);", FinalVehicleData); CustomWait.WaitFortheLoadingIconDisappear3000(); FinalVehicleData.Click(); CustomWait.WaitFortheLoadingIconDisappear2000(); CustomLib.AlertMessage(); } } }
public void ChangingFixedPrice(string FP, string Code, string Comment = null) { CustomWait.WaitFortheLoadingIconDisappear2000(); ((IJavaScriptExecutor)Drive.driver).ExecuteScript("arguments[0].scrollIntoView(true);", FixedPriceChange); FixedPriceChange.Click(); CustomWait.WaitFortheLoadingIconDisappear2000(); FixedPriceChange.SendKeys(Keys.Control + "A" + Keys.Delete); CustomWait.WaitFortheLoadingIconDisappear2000(); FixedPriceChange.SendKeys(FP); FixedPriceChange.SendKeys(Keys.Enter); CustomWait.WaitFortheLoadingIconDisappear2000(); Console.WriteLine(CauseCodesDeletionTitle.Text); CustomWait.WaitFortheLoadingIconDisappear2000(); CustomLib.DropDownbyName(Code, CodesDropDown); AddCommentInCauseCodeDeletion.SendKeys(Comment); OKCauseComments.Click(); CustomLib.AlertMessage(); CustomWait.WaitFortheLoadingIconDisappear3000(); }