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 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 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 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 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 GetTableRowDataForImportLabDictionaryErrors(List <ImportLabDictErrorData> errorData) { BrowserUtilities.DS_SwitchToFrame(); try { foreach (ImportLabDictErrorData data in errorData) { WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList(); 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)); if (list.List.Count > 0) { IControl tableRow = WebTableUtilities.Table_FindRow(ImportLabDictionaryPage.ErrorTable, list); if (Control_PropertyUtilities.IsControlNull(tableRow)) { Utilities.BrowserUtilities.SwitchToWindow(); return(false); } } } BrowserUtilities.SwitchToWindow(); return(true); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool VerifyLabAddress(String address, String city, String state, String country) { try { WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList(); list.AddSearchItem(new WebTable_SearchCriteriaItem(0, address, TableColumnContentType.Text)); list.AddSearchItem(new WebTable_SearchCriteriaItem(1, city, TableColumnContentType.Text)); list.AddSearchItem(new WebTable_SearchCriteriaItem(1, state, TableColumnContentType.Text)); list.AddSearchItem(new WebTable_SearchCriteriaItem(1, country, TableColumnContentType.Text)); IControl labAddressRow = WebTableUtilities.Table_FindRow(DL_Lab_MRR_Table.MrrTable, list, 0); IControl cellText = WebTableUtilities.GetCell(labAddressRow, 0); String mRR_PageName = Control_PropertyUtilities.GetText(cellText); if ((address.Equals(mRR_PageName, StringComparison.InvariantCultureIgnoreCase)) & (city.Equals(mRR_PageName, StringComparison.InvariantCultureIgnoreCase)) & (state.Equals(mRR_PageName, StringComparison.InvariantCultureIgnoreCase)) & (country.Equals(mRR_PageName, StringComparison.InvariantCultureIgnoreCase))) { return(true); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
static bool VerifyPrintCheckboxValue(IControl row, DCFPrintWizardStep1Data data) { try { if (!String.IsNullOrEmpty(data.IsPrintEnabled)) { if (!Control_PropertyUtilities.IsControlNull(row)) { IControl printCheckbox = WebTableUtilities.GetElement(row, String.Empty, 5, TableColumnContentType.Checkbox); if (!Control_PropertyUtilities.IsControlNull(printCheckbox)) { bool found = false; String checkedValue = Control_PropertyUtilities.GetAttributeValue(printCheckbox, "checked", out found); return(found); } } return(false); } else { return(true); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
static bool AreJobsFinished(List <String> subjectList) { try { ReadOnlyCollection <IControl> rows = WebTableUtilities.GetRows(Pages.DataLabs.Inbox.DL_InboxPage.InboxTable); if (rows.Count > subjectList.Count) { int i = 1; foreach (String subjectText in subjectList) { IControl c = WebTableUtilities.GetElement(rows[i], subjectText, 3, TableColumnContentType.Link_Partial); if (Control_PropertyUtilities.IsControlNull(c)) { return(false); } ++i; } return(true); } } catch (Exception e) { } return(false); }
public static bool FormQuestion(IEnumerable <FormQuestion> Questions) { try { IControl QuestionsTable = DS_Forms.QuestionsTable; foreach (FormQuestion question in Questions) { WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList(); searchList.AddSearchItem(new WebTable_SearchCriteriaItem(1, question.Question, TableColumnContentType.Link)); IControl row = WebTableUtilities.Table_FindRow(QuestionsTable, searchList, 2); if (!Control_PropertyUtilities.IsControlNull(row)) { Control_ActionUtilities.Click(row, "Question not visible"); string domainItem = Control_PropertyUtilities.GetText(DS_Forms.LabMappingFormItemName); if (!domainItem.Equals(question.DomainItem)) { return(false); } } } return(true); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool ClickInboxItem(String folderName, String subject) { try { int i = 0; while (i < 25) { if (BP_Inbox_ActionPaletteUtilities.InvokeActionPaletteItem(folderName)) { ReadOnlyCollection <IControl> rows = WebTableUtilities.GetRows(Pages.DataLabs.Inbox.DL_InboxPage.InboxTable); foreach (IControl row in rows) { IControl c = WebTableUtilities.GetElement(row, subject, 3, TableColumnContentType.Link_Partial); if (!Control_PropertyUtilities.IsControlNull(c)) { return(Control_ActionUtilities.Click(c, "Unbale to click inbox item for subject " + subject)); } } } ++i; Thread.Sleep(5000); } } catch (Exception e) { } return(false); }
public static bool DeleteTheRecordUsingDeleteIcon(string refID, string action) { try { DL_Lab_MRR_Table.NavigateToFirstPage(DL_Lab_MRR_Table.Pager); do { WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList(); searchList.AddSearchItem(new WebTable_SearchCriteriaItem(1, refID, TableColumnContentType.Text)); IControl row = WebTableUtilities.Table_FindRow(DL_Lab_MRR_Table.MrrTable, searchList, 0); if (!Control_PropertyUtilities.IsControlNull(row)) { IControl actionsCell = WebTableUtilities.GetCell(row, 13); IControl icon = DL_Lab_MRR_Table.GetActionIcon(actionsCell, action); return(Control_ActionUtilities.Click(icon, String.Empty)); } }while (DL_Lab_MRR_Table.NavigateToNextPage(DL_Lab_MRR_Table.Pager)); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool VeifyTheIconsForTheDeletedRecords(string refID, string action) { try { DL_Lab_MRR_Table.NavigateToFirstPage(DL_Lab_MRR_Table.Pager); do { WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList(); searchList.AddSearchItem(new WebTable_SearchCriteriaItem(1, refID, TableColumnContentType.Text)); IControl row = WebTableUtilities.Table_FindRow(DL_Lab_MRR_Table.MrrTable, searchList, 0); if (!Control_PropertyUtilities.IsControlNull(row)) { IControl actionsCell = WebTableUtilities.GetCell(row, 13); IControl icon = DL_Lab_MRR_Table.GetActionIcon(actionsCell, action); if (action.Equals("Edit") || action.Equals("Delete")) { return(Control_PropertyUtilities.IsControlNull(icon)); } else if (action.Equals("History") || action.Equals("Copy")) { return(Control_PropertyUtilities.IsEnabled(icon)); } } }while (DL_Lab_MRR_Table.NavigateToNextPage(DL_Lab_MRR_Table.Pager)); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool RecordsVerificationForCancel(string refID) { try { bool recordFound = false; DL_Lab_MRR_Table.NavigateToFirstPage(DL_Lab_MRR_Table.Pager); do { WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList(); searchList.AddSearchItem(new WebTable_SearchCriteriaItem(1, refID, TableColumnContentType.Text)); IControl row = WebTableUtilities.Table_FindRow(DL_Lab_MRR_Table.MrrTable, searchList, 0); if (!Control_PropertyUtilities.IsControlNull(row)) { recordFound = true; } }while (DL_Lab_MRR_Table.NavigateToNextPage(DL_Lab_MRR_Table.Pager)); return(recordFound); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
static IControl GetRow(Site_ManageVersionsData data) { try { WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList(); if (!String.IsNullOrEmpty(data.Version)) { WebTable_SearchCriteriaItem searchItem = new WebTable_SearchCriteriaItem(0, data.Version, TableColumnContentType.Text); searchList.AddSearchItem(searchItem); } if (!String.IsNullOrEmpty(data.Patients)) { WebTable_SearchCriteriaItem searchItem = new WebTable_SearchCriteriaItem(3, data.Patients, TableColumnContentType.Text); searchList.AddSearchItem(searchItem); } if (!String.IsNullOrEmpty(data.PublishedDateTime)) { WebTable_SearchCriteriaItem searchItem = new WebTable_SearchCriteriaItem(4, data.PublishedDateTime, TableColumnContentType.Text_Partial); searchList.AddSearchItem(searchItem); } if (!String.IsNullOrEmpty(data.Status)) { WebTable_SearchCriteriaItem searchItem = new WebTable_SearchCriteriaItem(5, data.Status, TableColumnContentType.Text); searchList.AddSearchItem(searchItem); } return(WebTableUtilities.Table_FindRow(DL_Site_ManageVersionsPage.VersionsTable, searchList)); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(null); }
public static bool VeifyTheStrikeThroughRecords(string refID) { try { bool recordFoundInStrikeThroughMode = false; DL_Lab_MRR_Table.NavigateToFirstPage(DL_Lab_MRR_Table.Pager); do { WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList(); searchList.AddSearchItem(new WebTable_SearchCriteriaItem(1, refID, TableColumnContentType.Text)); IControl row = WebTableUtilities.Table_FindRow(DL_Lab_MRR_Table.MrrTable, searchList, 0); if (!Control_PropertyUtilities.IsControlNull(row)) { IControl strikedRow = DL_Lab_Mrr_Delete.StrikeThroughRow; IControl checkboxForDeletedRecord = DL_Lab_Mrr_Delete.Checkbox(row); if (Control_PropertyUtilities.IsControlNull(strikedRow) && Control_PropertyUtilities.IsControlNull(checkboxForDeletedRecord)) { recordFoundInStrikeThroughMode = true; } } }while (DL_Lab_MRR_Table.NavigateToNextPage(DL_Lab_MRR_Table.Pager)); return(recordFoundInStrikeThroughMode); } 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 static bool AreSitesAvailable(IEnumerable <String> sites) { bool retval = false; try { BrowserUtilities.SwitchToFrame(); List <String> siteList = (List <String>)sites; foreach (String site in siteList) { WebTable_SearchCriteriaItemList searchList = new WebTable_SearchCriteriaItemList(); searchList.AddSearchItem(new WebTable_SearchCriteriaItem(0, site, TableColumnContentType.CheckboxAndText)); IControl row = WebTableUtilities.Table_FindRow(DL_AdvancedSearchWindow.SitesTable, searchList, 1); if (Control_PropertyUtilities.IsControlNull(row)) { retval = false; } } retval = true; } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } BrowserUtilities.SwitchToWindow(); return(retval); }
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 IsStudyAvailableinHomePage(IEnumerable <StudyData> studies) { try { bool isClicked = false; String notificationMessage = "Study has been successfully deleted"; IControl StudiesTable = DS_HomePage.StudiesTable; 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(DS_HomePage.StudiesTable, searchList, 0); if (!Control_PropertyUtilities.IsControlNull(row)) { IControl cell = WebTableUtilities.GetCell(row, 9); if ((Control_ActionUtilities.MouseClick(cell, String.Empty))) { if (Control_ActionUtilities.ClickModalButton(DS_ConfirmationPopup.DeleteJobsContinue)) { isClicked = DS_BP_NotificationUtilities.VerifyNotificationForDict(notificationMessage); } } } } return(isClicked); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool IsLabExistInLabsTableOfSite(LabData labData) { try { WebTable_SearchCriteriaItemList list = new WebTable_SearchCriteriaItemList(); list.AddSearchItem(new WebTable_SearchCriteriaItem(0, labData.LabId, TableColumnContentType.Text)); IControl siteRow = WebTableUtilities.Table_FindRow(DL_AddSitePage.ActiveSubTabTable, list, 1); if (siteRow != null) { bool isLabNameExist = WebTableUtilities.HasText(siteRow, 1, labData.LaboratoryName); bool isCompanyExist = WebTableUtilities.HasText(siteRow, 2, labData.Company); bool isdepartmentExist = WebTableUtilities.HasText(siteRow, 3, labData.Department); bool isStatusExist = WebTableUtilities.HasText(siteRow, 6, labData.LaboratoryStatus); new DebugLogGenerator().WriteLog(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, "Lab Name Exists - " + isLabNameExist.ToString() + ",Company Exists - " + isCompanyExist.ToString() + ",Department Exists - " + isdepartmentExist.ToString() + ",Status Exists - " + isStatusExist.ToString()); return(isLabNameExist && isCompanyExist && isdepartmentExist && isStatusExist); } } 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); }
static IControl GetFormRow(String eventName, String formName, out IControl formCell) { formCell = null; String identifier = String.Empty; try { if (ExpandEvent(eventName, out identifier) && !String.IsNullOrEmpty(identifier)) { ReadOnlyCollection <IControl> rows = DL_CRF_PDEP_EventsPage.GetRowsEventRows(identifier); foreach (IControl row in rows) { if (Control_PropertyUtilities.IsControlVisible(row)) { formCell = WebTableUtilities.GetCell(row, 2); String formText = Control_PropertyUtilities.GetText(formCell); if (formName.Equals(formText, StringComparison.InvariantCultureIgnoreCase)) { return(row); } } } } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(null); }
public static bool TargetStudy() { try { IControl CodelistTable = SyncUtilities.FindVisibleElement(By.Id("LabAttributeReference_0_CodeListMappingsReference_0_CodelistMapping_TT")); ReadOnlyCollection <IControl> rows = null; if (WebTableUtilities.GetRowCount(CodelistTable, out rows) > 0) { foreach (IControl row in rows) { bool found; IControl celldata = WebTableUtilities.GetCell(row, 1); String attribureValue = Control_PropertyUtilities.GetAttributeValue(celldata, "class", out found); if (found) { if (attribureValue.Contains("modified-cell")) { Control_PropertyUtilities.CompareCSSValue(celldata, "background-color", "#fcdc75"); } } } } } catch (Exception e) { } return(true); }
public static bool AddEditSecondaryCodelistItems(String primary) { IControl row = WebTableUtilities.Table_FindRow(CodeListsGroupPage.PrimarySecondaryCodeListItemsTable, GetSearchItemList(primary), 0); IControl proecssCell = WebTableUtilities.GetCell(row, 2); IControl link = WebTableUtilities.GetLink(proecssCell); return(Control_ActionUtilities.Click(link, "Unable to find to click" + primary)); }
public static IControl GetPatientRowFromPatientsTable(string PatientID) { WebTable_SearchCriteriaItem Item = new WebTable_SearchCriteriaItem(0, PatientID, TableColumnContentType.Link); WebTable_SearchCriteriaItemList SearchList = new WebTable_SearchCriteriaItemList(); SearchList.AddSearchItem(Item); return(WebTableUtilities.Table_FindRow(DL_PatientsPage.PatientsTable, SearchList)); }
public static string ReadtheRefID() { DL_Lab_MRR_Table.NavigateToLastPage(DL_Lab_MRR_Table.Pager); System.Collections.ObjectModel.ReadOnlyCollection <IControl> rows = null; int rowCount = WebTableUtilities.GetRowCount(DL_Lab_MRR_Table.MrrTable, out rows); string refID = WebTableUtilities.GetValue(DL_Lab_MRR_Table.MrrTable, rowCount - 1, 1); return(refID); }
public static IControl GetLabLink(String labId) { IControl labRow = GetLabRow(labId); if (labRow != null) { return(WebTableUtilities.GetElement(labRow, labId, 0, TableColumnContentType.Link)); } return(null); }
public static IControl GetLabRow(String labId) { ReadOnlyCollection <IControl> rows = null; if (WebTableUtilities.GetRowCount(DL_LabManagementPage.LabsTable, out rows) > 0) { return(FindLabRow(labId)); } return(null); }
public static bool ClickOnColumnHeader(String columnName) { IControl columnNameLink = WebTableUtilities.GetColumnHeader(DL_LabManagementPage.LabsGridTitleRow, columnName, TableColumnContentType.Link); if (columnNameLink != null) { return(Control_ActionUtilities.Click(columnNameLink, String.Empty)); } return(false); }