public void CopyFromCreateJobOrder() { try { var datarows = EllisHome.Initialize(ExcelFileNames.JobOrder); foreach ( var dataRow in datarows.TakeWhile(dataRow => dataRow.ItemArray[1].ToString().Equals("CreateJobOrder"))) { if (dataRow.ItemArray[1].ToString().Equals("CreateJobOrder")) { //Console.WriteLine(dataRow.ItemArray[1]); var jobOrderCreated = JobOrderWindow.CreateNewJobOrder(dataRow); Factory.AssertIsTrue(jobOrderCreated, "Job order not saved successfully"); //Copy Job Order Details from opened job order var status = CopyJobOrder.CopyJobOrderDetails(); if (status) { OpenJobOrder.CloseJobOrderProfile(); } JobOrderWindow.ClickOnButton("Cancel"); Factory.AssertIsTrue(status, "Job Order not copied successfully"); } } } finally { Cleanup(); } }
public void CopyJobOrderDetails() { try { EllisHome.Initialize(); LandingPage.SelectFromToolbar("Job Orders"); CopyJobOrder.OpenAnyJobOrder(); //Copy Job Order Details from opened job order var status = CopyJobOrder.CopyJobOrderDetails(); if (status) { Factory.ClickButton(JobOrderWindow.GetNewJobOrderWindowProperties(), "btnCancel"); } OpenJobOrder.CloseJobOrderProfile(); Factory.AssertIsTrue(status, "Job Order not copied successfully"); } finally { Cleanup(); } }
public void CopyAndCreateJobOrder() { try { //Create job order from a copied details var datarows = EllisHome.Initialize(ExcelFileNames.JobOrder); foreach (var dataRow in datarows.Where(dataRow => dataRow.ItemArray[1].ToString().Equals("CopyJobOrder"))) { LandingPage.SelectFromToolbar("Job Orders"); //TableActions.OpenRecordFromTable(EllisWindow, "_grdJobOrders", "Job Order #", dataRow.ItemArray[2].ToString()); CopyJobOrder.OpenAnyJobOrder(); //Copy Job Order Details from opened job order var status = CopyJobOrder.CopyJobOrderDetails(); if (status) { //Console.WriteLine(dataRow.ItemArray[1]); //JobOrderWindow.EnterJobOrderData(dataRow); //JobOrderWindow.ClickOnButton("Search"); //Playback.Wait(3000); JobOrderWindow.ClickOnContinueBtn(); Windows.CustomerWindow.CustomerProfileWindow.CloseWarningWindow(); //// Find Quote Tab/Window //Playback.Wait(3000); //JobOrderFindQuoteWindow.EnterJobOrderFindQuoteData(dataRow); //JobOrderFindQuoteWindow.ClickOnButton("GO"); Playback.Wait(2000); JobOrderWindow.ClickOnContinueBtn(); // Enter Basic Job Order Details BasicJobInformationWindow.EnterBasicJobInformationWindowData(dataRow); BasicJobInformationWindow.ClickOnContinueBtn(); status = PreQualifyingQuestionsWindow.HandleAlertWindow(); if (status) { Factory.AssertIsFalse(status, "Job Order alredy exist for this customer"); } else { // Enter Schedule And Additional Charges Details ScheduleAndAdditionalChargesWindow.EnterDataInScheduleAndAdditionalChargesWindow(dataRow); ScheduleAndAdditionalChargesWindow.ClickOnAddNotesBtn(); // Enter Order Notes in Schedule And Additional Charges window ScheduleAndAdditionalChargesWindow.EnterDataInJobOrderNotesWindow(dataRow); // Focus back to Schedule And Additional Charges window ScheduleAndAdditionalChargesWindow.ClickOnContinueBtn(); //Enter data in Requirements window RequirementsWindow.EnterDatainRequirementsWindow(dataRow); RequirementsWindow.ClickOnButton("Continue >"); Playback.Wait(3000); //Enter data in Pre-Qualifying Requirements Window PreQualifyingQuestionsWindow.ClickonSaveButton(); PreQualifyingQuestionsWindow.HandleChooseLocationWindow(); PreQualifyingQuestionsWindow.HandleWorkLocationWindow(); Playback.Wait(3000); status = PreQualifyingQuestionsWindow.HandleAlertWindow(); Factory.AssertIsTrue(status, "Job order not saved successfully"); JobOrderWindow.CloseJobOrderProfileWindow(); JobOrderWindow.CloseJobOrderProfileWindow(); } } } } finally { Cleanup(); } }