public void JobOrderAdvanceSearch() { Initialize(); var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.QOTAdvancedSearch); foreach (var dataRow in datarows) { if (dataRow.ItemArray[1].ToString() == "JobOrder") { SearchWindow.SelectSearchElements(null, "JobOrder", SearchWindow.SearchTypeConstants.Advanced); QOTAdvancedSearchWindow.EnterJobOrderSearchData(dataRow); QOTAdvancedSearchWindow.ClickSearchBtn(); Playback.Wait(10000); var jobOrder = QOTAdvancedSearchWindow.SelectJobOrderRecord(dataRow.ItemArray[76].ToString()); if (!jobOrder) { var winInst = JobOrderWindow.GetJobOrderProfileProperties(); if (winInst.Exists) { MouseActions.ClickButton(JobOrderWindow.GetJobOrderProfileProperties(), "btnClose"); } } if (ARAdvancedSearchWindow.VerifySearchResultsWindowDisplayed()) { ARAdvancedSearchWindow.CloseSearchResultsWindow(); } } } Cleanup(); }
public void DispatchAdvanceSearch() { Initialize(); var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.QOTAdvancedSearch); foreach (var dataRow in datarows) { if (dataRow.ItemArray[1].ToString() == "Dispatch") { SearchWindow.SelectSearchElements(null, "Dispatch", SearchWindow.SearchTypeConstants.Advanced); QOTAdvancedSearchWindow.EnterDispatchSearchData(dataRow); QOTAdvancedSearchWindow.ClickSearchBtn(); Playback.Wait(10000); var dispatch = QOTAdvancedSearchWindow.SelectDispatchRecord(dataRow.ItemArray[53].ToString()); if (dispatch) { Playback.Wait(7000); MouseActions.ClickButton(JobOrderWindow.GetJobOrderProfileProperties(), "btnClose"); Playback.Wait(2000); ARAdvancedSearchWindow.CloseSearchResultsWindow(); } if (ARAdvancedSearchWindow.VerifySearchResultsWindowDisplayed()) { ARAdvancedSearchWindow.CloseSearchResultsWindow(); } } } Cleanup(); }