public static bool ClearFilter(String columnName) { try { IControl filterIcon = BP_ManageReferenceRange_MRRUtilities.GetColumnFilterLink(columnName); Control_ActionUtilities.Click(filterIcon, String.Empty); IControl clearIcon = DL_Lab_MRR_Table_Changes.ClearButton; Control_ActionUtilities.Click(clearIcon, String.Empty); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); return(false); } return(true); }
//public static bool ApplyFilter(String columnName, String filterText, String filterCriteria) //{ // try // { //IControl filterTextbox = WebTableUtilities.GetFilterTextbox(DL_Lab_ManageReferenceRanges.LabsGridFilterRow, GetColumnIndex(columnName)); // Control_ActionUtilities.Textbox_SetText(filterTextbox, filterText, String.Empty); // IControl filterCriteriaIcon = WebTableUtilities.GetFilterCriteriaIcon(DL_Lab_ManageReferenceRanges.LabsGridFilterRow, GetColumnIndex(columnName)); // Control_ActionUtilities.Click(filterCriteriaIcon, String.Empty); // IControl filterCriteriaItem = DL_CommonObjects.GetActiveFilterItem(filterCriteria); // Control_ActionUtilities.Click(filterCriteriaItem, String.Empty); // } // catch (Exception e) // { // new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); // return false; // } // return true; //} public static bool ApplyFilter(String columnName, string filterText, String filterCriteria) { try { IControl filterIcon = BP_ManageReferenceRange_MRRUtilities.GetColumnFilterLink(columnName); bool isFilterIconClicked = Control_ActionUtilities.Click(filterIcon, String.Empty); bool isDropdownClicked = Control_ActionUtilities.Click(DL_Lab_MRR_Table.FilterDropDownIcon, String.Empty); IControl filterCriteriaItem = BP_ManageReferenceRange_MRRUtilities.GetActiveFilterItem(filterCriteria); bool isFilterCriteriaClicked = Control_ActionUtilities.Click(filterCriteriaItem, String.Empty); IControl filterTextbox; //if (columnName.Equals("Lab ID") || columnName.Equals("Lab Status") || columnName.Equals("Company")) //{ filterTextbox = DL_Lab_ManageReferenceRanges.FilterTextBox; Control_ActionUtilities.Textbox_SetText(filterTextbox, filterText, String.Empty); IControl filterButton = DL_Lab_MRR_Table.FilterButton; Control_ActionUtilities.Click(filterButton, String.Empty); //} //else if (columnName.Equals("Gender")) //{ // filterTextbox = DL_Lab_MRR_Table.FilterTextBox; // Control_ActionUtilities.Textbox_SetText(filterTextbox, filterText, String.Empty); // IControl filterButton = DL_Lab_MRR_Table.FilterButton; // Control_ActionUtilities.Click(filterButton, String.Empty); //} //else if (columnName.Equals("Start Date") || columnName.Equals("End Date")) //{ // filterTextbox = DL_Lab_MRR_Table_Changes.FilterTextBoxForDateInputFieldInMRRTable; // Control_ActionUtilities.Textbox_SetText(filterTextbox, filterText, String.Empty); // IControl filterButton = DL_Lab_MRR_Table.FilterButton; // Control_ActionUtilities.Click(filterButton, String.Empty); //} } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); return(false); } return(true); }