public void InvoiceRelationShipsAdvanceSearch() { Initialize(); var datarows = ExcelReader.ImportSpreadsheet(ExcelFileNames.ARAdvancedSearch); foreach (var dataRow in datarows) { if (dataRow.ItemArray[1].ToString() == "Relationship") { SearchWindow.SelectSearchElements(null, "IRelationShips2", SearchWindow.SearchTypeConstants.Advanced); ARAdvancedSearchWindow.EnterRelationshipSearchData(dataRow); ARAdvancedSearchWindow.ClickSearchBtn(); Playback.Wait(10000); var relationship = ARAdvancedSearchWindow.SelectInvoiceRecord(dataRow.ItemArray[75].ToString()); if (relationship) { Playback.Wait(7000); MouseActions.ClickButton(CustomerProfileWindow.GetCustomerInvoiceWindowProperties(), "_btnCancel"); ARAdvancedSearchWindow.CloseSearchResultsWindow(); } if (ARAdvancedSearchWindow.VerifySearchResultsWindowDisplayed()) { ARAdvancedSearchWindow.CloseSearchResultsWindow(); } } } Cleanup(); }