public static bool SelectSites(List <StudyArchive_SiteData> sites) { try { foreach (StudyArchive_SiteData site in sites) { WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList(); list.AddSearchItem(new WebTable_SearchCriteriaItem(1, site.Site, TableColumnContentType.Text)); IControl tableRow = WebTableUtilities.Table_FindRow(DL_ArchiveExportPage.SitesTable, list); if (!Control_PropertyUtilities.IsControlNull(tableRow)) { IControl tableCell = WebTableUtilities.GetCell(tableRow, 0); IControl checkbox = WebTableUtilities.GetInputControl(tableCell); if (!Control_ActionUtilities.Click(checkbox, "Unable to click site " + site.Site + "checkbox in ArchiveExportPage")) { return(false); } } } return(true); } catch (Exception e) { } return(false); }
public static bool CollapseEvent(String eventName, out String patientEventKey) { patientEventKey = String.Empty; try { int i = 0; while (i < 5) { IControl eventExpandCollapseImage = GetEventExpandCollapseImage(eventName, out patientEventKey); if (eventExpandCollapseImage != null && eventExpandCollapseImage.WebElement != null) { bool found = false; String prop_SRC = Control_PropertyUtilities.GetAttributeValue(eventExpandCollapseImage, "src", out found); if (found && prop_SRC.Contains("menu_collapse.gif")) { Control_ActionUtilities.Click(eventExpandCollapseImage, String.Empty); } else if (found && prop_SRC.Contains("menu_expand.gif")) { return(true); } } Thread.Sleep(2000); ++i; } } catch (Exception e) { } return(false); }
public static bool SelectDerivationByDerivationNameFilter(string derivationName) { try { Control_ActionUtilities.Click(DL_DerivationManagement.derivationNameTextBoxFilter, "Unable to select the filter icon"); Thread.Sleep(2000); Control_ActionUtilities.Click(DL_DerivationManagement.FilterTypeLink("NoFilter"), "Unable to select the Nofilter icon"); Thread.Sleep(2000); Control_ActionUtilities.Textbox_SetText(DL_DerivationManagement.derivationNameTextBox, derivationName, "unable to set the derivation name - " + derivationName + "in the derivation name textbox"); Thread.Sleep(5000); if (!Control_PropertyUtilities.IsControlNull(DL_DerivationManagement.derivationNameLink(derivationName))) { if (!Control_ActionUtilities.Click(DL_DerivationManagement.derivationNameLink(derivationName), "Unable to select the link - " + derivationName)) { return(false); } else { return(true); } } return(false); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool IsStudyAvailable(IEnumerable <StudyData> studies) { try { IControl StudiesTable = DS_HomePage.StudiesTableInCreateStudyFromExistingStudyWindow; foreach (StudyData study in studies) { WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList(); searchList.AddSearchItem(new WebTable_SearchCriteriaItem(1, study.StudyName, TableColumnContentType.Link)); IControl row = WebTableUtilities.Table_FindRow(StudiesTable, searchList, 0); if (Control_PropertyUtilities.IsControlNull(row)) { return(false); } IControl cell = WebTableUtilities.GetCell(row, 1); IControl link = WebTableUtilities.GetLink(cell); Control_ActionUtilities.Click(link, "linknotfound"); } return(true); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool RemoveUserFromSiteUsers(String userName) { try { //if (!Control_ActionUtilities.Dropdown_IsItemAvailable(DL_Site_ManageUsersPage.AvailableUsersListBox, userName, String.Empty)) //{ if (Control_ActionUtilities.Dropdown_SelectItem(DL_Site_ManageUsersPage.SiteUsersListBox, userName, String.Empty)) { if (Control_ActionUtilities.Click(DL_Site_ManageUsersPage.RemoveButton, String.Empty)) { return(Control_ActionUtilities.Click(DL_Site_ManageUsersPage.SaveButton, String.Empty)); } } //} else { return(Control_ActionUtilities.Click(DL_Site_ManageUsersPage.CancelButton, String.Empty)); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool SelectePatients(List <SiteManagementMigratePatientsData> patients) { bool isSuccess = false; try { foreach (SiteManagementMigratePatientsData patient in patients) { WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList(); list.AddSearchItem(new WebTable_SearchCriteriaItem(0, patient.PatientID, TableColumnContentType.Text)); IControl patientRow = WebTableUtilities.Table_FindRow(DL_MigratePatientsPage.PatientsTable, list, 0); IControl checkboxCell = WebTableUtilities.GetCell(patientRow, 2); IControl checkbox = WebTableUtilities.GetInputControl(checkboxCell); bool found = false; String propValue = Control_PropertyUtilities.GetAttributeValue(checkbox, "checked", out found); if (!found) { isSuccess = Control_ActionUtilities.Click(checkbox, String.Empty); } } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(isSuccess); }
public void ThenIPressLabCreationCancelButton() { if (!Control_ActionUtilities.Click(DL_AddLabPage.CancelButton, String.Empty)) { ScenarioContext.Current["ActResult"] = "Failed"; } }
public static bool DeleteGroup(String groupName) { try { IControl groupsTable = DL_DeleteGroupsPage.GroupsTable; WebTable_SearchCriteriaItem searchCreteriaItem = new WebTable_SearchCriteriaItem(0, groupName, TableColumnContentType.CheckboxAndText); WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList(); list.AddSearchItem(searchCreteriaItem); IControl tableRow = WebTableUtilities.Table_FindRow(groupsTable, list); if (tableRow != null) { IControl checkbox = WebTableUtilities.GetElement(tableRow, String.Empty, 0, TableColumnContentType.CheckboxAndText); Control_ActionUtilities.Click(checkbox, String.Empty); return(Control_ActionUtilities.Click_PerssEnterKey(DL_DeleteGroupsPage.DeleteButton, String.Empty)); } else { return(Control_ActionUtilities.Click_PerssEnterKey(DL_DeleteGroupsPage.CancelButton, String.Empty)); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool FillEnrollPatientCRF(EnrollPatientData Data) { bool isDataFilled = true; if (Data.EnrollID != string.Empty) { if (!BP_CRFUtilities.SetValueInTextBox_FlatQuestion("Enroll ID:", Data.EnrollID)) { isDataFilled = false; } } if (!BP_CRFUtilities.SetValueInTextBox_FlatQuestion("Enrolled Date:", Data.EnrollDate)) { isDataFilled = false; } if (Data.EntryComplete == "Yes") { if (!Control_ActionUtilities.Click(DL_CRFPage.EntryCompleteChkBox, "Unable to select Entry Complete checkbox.")) { isDataFilled = false; } } return(isDataFilled); }
public static bool ApplyFilterWithInvalidData(string columnName, string columnData, string filterCriteria) { try { IControl filterTextbox = WebTableUtilities.GetFilterTextbox(DL_Lab_ManageReferenceRanges.LabsGridFilterRow, GetColumnIndex(columnName)); Control_ActionUtilities.Textbox_SetText(filterTextbox, columnData, 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); IControl filterTextbox1 = WebTableUtilities.GetFilterTextbox(DL_Lab_ManageReferenceRanges.LabsGridFilterRow, GetColumnIndex(columnName)); Control_ActionUtilities.Textbox_SetText(filterTextbox1, columnData, String.Empty); IControl filterCriteriaIcon1 = WebTableUtilities.GetFilterCriteriaIcon(DL_Lab_ManageReferenceRanges.LabsGridFilterRow, GetColumnIndex(columnName)); Control_ActionUtilities.Click(filterCriteriaIcon1, String.Empty); IControl filterCriteriaItem1 = DL_CommonObjects.GetActiveFilterItem(filterCriteria); Control_ActionUtilities.Click(filterCriteriaItem1, String.Empty); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); return(false); } return(true); }
public static bool OpenLab(ManageReferenceLabGridRowData labGridRowData) { try { WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList(); list.AddSearchItem(new WebTable_SearchCriteriaItem(0, labGridRowData.labId, TableColumnContentType.Text)); list.AddSearchItem(new WebTable_SearchCriteriaItem(1, labGridRowData.laboratoryName, TableColumnContentType.Text)); list.AddSearchItem(new WebTable_SearchCriteriaItem(2, labGridRowData.Company, TableColumnContentType.Text)); list.AddSearchItem(new WebTable_SearchCriteriaItem(3, labGridRowData.Department, TableColumnContentType.Text)); list.AddSearchItem(new WebTable_SearchCriteriaItem(4, labGridRowData.Address, TableColumnContentType.Text)); list.AddSearchItem(new WebTable_SearchCriteriaItem(5, labGridRowData.City, TableColumnContentType.Text)); list.AddSearchItem(new WebTable_SearchCriteriaItem(6, labGridRowData.State, TableColumnContentType.Text)); list.AddSearchItem(new WebTable_SearchCriteriaItem(7, labGridRowData.Country, TableColumnContentType.Text)); list.AddSearchItem(new WebTable_SearchCriteriaItem(8, labGridRowData.Lab_Status, TableColumnContentType.Text)); IControl labRow = WebTableUtilities.Table_FindRow(DL_Lab_ManageReferenceRanges.LabsTable, list); if (labRow != null) { IControl labIdLink = WebTableUtilities.GetElement(labRow, labGridRowData.labId, 0, TableColumnContentType.Link); return(Control_ActionUtilities.Click(labIdLink, String.Empty)); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool ClickButtonOnDefinePatientIdentifiersPage(string ButtonName) { try { IControl Button; if (ButtonName.ToUpper() == "SAVE") { Button = DL_DefinePatientIdentifiers.SaveButton; } else if (ButtonName.ToUpper() == "SAVE & NEXT") { Button = DL_DefinePatientIdentifiers.SaveAndNextButton; } else { Button = DL_DefinePatientIdentifiers.CancelButton; } return(Control_ActionUtilities.Click(Button, "Unable to click '" + ButtonName + "' on General Configurations page.")); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool GetTableRowData(List <ImportLabDictErrorData> errorData) { BrowserUtilities.DS_SwitchToFrame(); try { WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList(); foreach (ImportLabDictErrorData data in errorData) { list.AddSearchItem(new WebTable_SearchCriteriaItem(0, data.WorkSheet, TableColumnContentType.Text)); list.AddSearchItem(new WebTable_SearchCriteriaItem(1, data.Row, TableColumnContentType.Text)); list.AddSearchItem(new WebTable_SearchCriteriaItem(2, data.Column, TableColumnContentType.Text)); list.AddSearchItem(new WebTable_SearchCriteriaItem(3, data.Error, TableColumnContentType.Text)); IControl processRow = WebTableUtilities.Table_FindRow(ImportLabDictionaryPage.ImportLabDictErrorTable, list); if (!Control_PropertyUtilities.IsControlNull(processRow)) { Control_ActionUtilities.Click(ImportLabDictionaryPage.ImportLabDictErrorTableOkButton, String.Empty); BrowserUtilities.SwitchToWindow(); return(true); } } Control_ActionUtilities.Click(ImportLabDictionaryPage.ImportLabDictErrorTableOkButton, String.Empty); BrowserUtilities.SwitchToWindow(); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool SelectCheckboxForPatients(List <PatientTableData> PatientList, out List <string> FailedItems) { bool isSuccess = false; FailedItems = new List <string>(); try { foreach (PatientTableData Patient in PatientList) { if (!Control_PropertyUtilities.IsControlNull(DL_FreezePatientPage.GetFreezeCheckBoxForPatient(Patient.PatientID))) { isSuccess = Control_ActionUtilities.Click(DL_FreezePatientPage.GetFreezeCheckBoxForPatient(Patient.PatientID), "Unable to Select checkbox for - " + Patient.PatientID); } else { FailedItems.Add(Patient.PatientID); isSuccess = false; } } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(isSuccess); }
public static bool SelectFlagDataGroupList(List <FlagManagementData> ItemstoSelect, out List <String> FailedItemsList) { FailedItemsList = new List <String>(); bool isSuccess = true; bool areAllDGOptions = true; string DropdownName = "Select Flag Data Group(s)"; try { if (!SelectFlagDataGroupDropdown(DropdownName)) { return(false); } foreach (FlagManagementData ItemOption in ItemstoSelect) { isSuccess = Control_ActionUtilities.Click(DL_CreateFlagPlanPage.GetFlagDataGroupListValue(ItemOption.FlagDataGroup), "Unable to Select the Flag Data Group Option"); if (!isSuccess) { FailedItemsList.Add(ItemOption.FlagDataGroup); areAllDGOptions = false; } } return(areAllDGOptions); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(areAllDGOptions); }
public static bool SelectScriptingCheckboxToRun(String scriptingType) { try { if (!String.IsNullOrEmpty(scriptingType)) { if (scriptingType.Equals("pScripts", StringComparison.InvariantCultureIgnoreCase)) { return(Control_ActionUtilities.Click(DL_PublishStudyPage_MinorStudyUpdate.pScriptCheckbox, String.Empty)); } else if (scriptingType.Equals("Derivations", StringComparison.InvariantCultureIgnoreCase)) { return(Control_ActionUtilities.Click(DL_PublishStudyPage_MinorStudyUpdate.DerivationsCheckbox, String.Empty)); } else if (scriptingType.Equals("Queries", StringComparison.InvariantCultureIgnoreCase)) { return(Control_ActionUtilities.Click(DL_PublishStudyPage_MinorStudyUpdate.QueriesCheckbox, String.Empty)); } } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool ClickButtonOnCreatePlanPage(string ButtonNameToClick) { try { switch (ButtonNameToClick.ToUpper()) { case "NEXT": return(Control_ActionUtilities.Click(DL_CreateFlagPlanPage.NextButton, "Unable to click Next button on the page.")); case "CANCEL": return(Control_ActionUtilities.Click(DL_CreateFlagPlanPage.CancelButton, "Unable to click Cancel button on the page.")); case "SAVE & CLOSE": return(Control_ActionUtilities.Click(DL_CreateFlagPlanPage.SaveCloseButton, "Unable to click Save & Close button")); case "BACK": return(Control_ActionUtilities.Click(DL_CreateFlagPlanPage.BackButton, "Unable to click Back button")); case "GET PATIENTS": return(Control_ActionUtilities.Click(DL_FlagManagementPage.GetPatientsButton, "Unable to click Get Patients button")); case "SAVE": return(Control_ActionUtilities.Click(DL_FlagManagementPage.SaveButton, "Unable to select Save button")); default: return(false); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
static bool SelectForm(SignCasebookData data) { try { IControl radioButton = DL_SignCasebookPage.GetRadioButton(data.EventName, data.FormName, data.RadioButton); if (!Control_PropertyUtilities.IsControlNull(radioButton)) { if (data.RadioButton.Equals("Reject")) { Control_ActionUtilities.Click(radioButton, String.Empty); Control_ActionUtilities.Click(DL_SignCasebookPage.GetAddReasonLink(data.EventName, data.FormName), "Unable to Select Add Reason link for " + data.EventName + "-" + data.FormName); BP_Modal_CRF_MarkItemUtilities.EnterComment(data.AddReason); return(BP_Modal_CRF_MarkItemUtilities.ClickOkButton()); } else if (!String.IsNullOrEmpty(data.RadioButton)) { return(Control_ActionUtilities.Click(radioButton, String.Empty)); } } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public void WhenIClikLabCreationSaveButton() { if (!Control_ActionUtilities.Click(DL_AddLabPage.SaveButton, String.Empty)) { ScenarioContext.Current["ActResult"] = "Failed"; } }
public static bool LabMappings() { try { bool found; IControl expandCollapseAllIcon = SyncUtilities.FindVisibleElement(By.Id("img_SubDataShape_SC")); String src = Control_PropertyUtilities.GetAttributeValue(expandCollapseAllIcon, "src", out found); if (found) { if (src.Contains("expand")) { Control_ActionUtilities.Click(expandCollapseAllIcon, String.Empty); LabMappingsDomain(); return(true); } else { LabMappingsDomain(); return(true); } } } catch (Exception e) { } return(false); }
public void WhenIClickMainTab(String mainTabName) { if (!Control_ActionUtilities.Click(DL_PrimaryTabs.GetPrimaryTab(mainTabName), String.Empty)) { ScenarioContext.Current["ActResult"] = "Failed"; } }
public static bool ExpandAttributeMappingGender() { try { bool found; IControl expandCollapseAllIcon = SyncUtilities.FindVisibleElement(By.Id("img_LabAttributeReference_0_S")); String src = Control_PropertyUtilities.GetAttributeValue(expandCollapseAllIcon, "src", out found); if (found) { if (src.Contains("expand")) { Control_ActionUtilities.Click(expandCollapseAllIcon, String.Empty); CodelistMappingsInAttributeMappings(); return(true); } else { CodelistMappingsInAttributeMappings(); return(true); } } } catch (Exception e) { } return(false); }
protected static void NavigateToPage(IControl tableHost, int rowNumber) { try { if (rowNumber > 0) { int rowsPerPage = 15; int pageNumber = ((rowNumber - 1) / rowsPerPage) + 1; IControl paginationControl = SyncUtilities.FindVisibleElement_Parent(tableHost.WebElement, By.ClassName("pagination")); String pageTitle = "li[title='Page :" + pageNumber + "']"; IControl pageLi = SyncUtilities.FindVisibleElement_Parent(paginationControl.WebElement, By.CssSelector(pageTitle)); if (!Control_PropertyUtilities.IsControlNull(pageLi)) { IControl pageNumberControl = SyncUtilities.FindElement_Parent(pageLi.WebElement, By.TagName("a")); if (!Control_PropertyUtilities.IsControlNull(pageNumberControl)) { Control_ActionUtilities.Click(pageLi, String.Empty); } } } } catch (Exception e) { } }
public static bool SelectFreezeThawButton(String buttonName) { try { switch (buttonName.ToUpper()) { case "FREEZE": return(Control_ActionUtilities.Click(DL_FreezeThawCRFs.freezeButton, "Unable to Select the Freeze button")); case "THAW": return(Control_ActionUtilities.Click(DL_FreezeThawCRFs.thawButton, "Unable to Select the Thaw button")); case "CANCEL": return(Control_ActionUtilities.Click(DL_FreezeThawCRFs.cancelButton, "Unable to Select the Cancel button")); case "SELECT ALL": return(Control_ActionUtilities.Click(DL_FreezeThawCRFs.selectAllButton, "Unable to Select the Select All button")); case "CLEAR ALL": return(Control_ActionUtilities.Click(DL_FreezeThawCRFs.selectAllButton, "Unable to Select the Clear All button")); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool VerifylabsDropDownValues(List <DropDownInfo> dropdownInfoList, String fieldName) { try { List <string> dropdown = new List <string>(); foreach (DropDownInfo dropdownInfo in dropdownInfoList) { dropdown.Add(dropdownInfo.Dropdown); } IControl dropdowncontrol = DS_StudyProperties.LabDropDown; Control_ActionUtilities.Click(dropdowncontrol, "Not able to click on dropdowncontrol"); IControl selectValueInDropdown = DS_StudyProperties.LabDropDownOptions; string selectValue = Control_PropertyUtilities.GetText(selectValueInDropdown); bool found = false; List <String> dropdownvalues = Control_ActionUtilities.Dropdown_GetItems(dropdowncontrol, out found); if (found) { bool comparison = DL_Lab_MRR_Table.AreListsEqual(dropdown, dropdownvalues); } return(true); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool ExpandEvent(String eventName, out String identifier) { identifier = String.Empty; try { ReadOnlyCollection <IControl> rows = WebTableUtilities.GetRows(DL_CRF_PDEP_EventsPage.EventsTable); foreach (IControl row in rows) { if (Control_PropertyUtilities.IsControlVisible(row)) { IControl cell = WebTableUtilities.GetCell(row, 0); if (Control_PropertyUtilities.GetText(cell).Equals(eventName, StringComparison.InvariantCultureIgnoreCase)) { IControl expandCollapseImage = WebTableUtilities.GetElement(row, String.Empty, 0, TableColumnContentType.Image); bool found = false; String imageSource = Control_PropertyUtilities.GetAttributeValue(expandCollapseImage, "src", out found); if (found) { identifier = Control_PropertyUtilities.GetAttributeValue(row, "identifier", out found); if (imageSource.Contains("menu_expand.gif")) { return(Control_ActionUtilities.Click(expandCollapseImage, String.Empty)); } return(imageSource.Contains("menu_collapse.gif")); } } } } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool ExpandAllEvents() { try { IControl expandCollapseAllIcon = SyncUtilities.FindVisibleElement(By.Id("imgExpandAll")); bool found = false; String src = Control_PropertyUtilities.GetAttributeValue(expandCollapseAllIcon, "src", out found); if (found) { if (src.Contains("menu_collapse")) { Control_ActionUtilities.Click(expandCollapseAllIcon, String.Empty); } Control_ActionUtilities.Click(expandCollapseAllIcon, String.Empty); } IControl expandCollapseAllIcon1 = SyncUtilities.FindVisibleElement(By.Id("imgExpandAll")); bool found1 = false; String src1 = Control_PropertyUtilities.GetAttributeValue(expandCollapseAllIcon, "src", out found1); if (found1) { return(src1.Contains("menu_collapse")); } } catch (Exception e) { } return(false); }
public static bool ExpandFlagsPalette() { try { IControl expandCollapseIcon = DL_EditDCFPage.DCF_FlagsPaletteCollaseExpandIcon; bool found = false; String src = Control_PropertyUtilities.GetAttributeValue(expandCollapseIcon, "src", out found); if (found) { if (src.Contains("menuDown")) { return(Control_ActionUtilities.Click(expandCollapseIcon, String.Empty)); } else { return(true); } } else { return(false); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool ExpandSearchPalette() { try { IControl c = DL_DCFs_SearchPalette.SearchPalette_ExpandCollapseIcon; bool found = false; String imageSource = Control_PropertyUtilities.GetAttributeValue(c, "src", out found); if (found) { if (imageSource.Contains("menuDown")) { return(Control_ActionUtilities.Click(c, String.Empty)); } else { return(true); } } else { return(false); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool ApplyFilterForSubHeading(String columnName, String filterText, String filterCriteria, int occurence) { try { IControl filterIcon = DL_Lab_MRR_Table.GetColumnFilterLinkForSubColumns(columnName, occurence); Control_ActionUtilities.Click(filterIcon, String.Empty); //Control_ActionUtilities.Click(filterIcon, String.Empty); Control_ActionUtilities.Click(DL_Lab_MRR_Table.FilterDropDownIcon, String.Empty); IControl filterCriteriaItem = DL_Lab_MRR_Table.GetActiveFilterItem(filterCriteria); Control_ActionUtilities.Click(filterCriteriaItem, String.Empty); IControl 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); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); return(false); } return(true); }