public static bool SetStatus(String status, String statusType) { bool retVal = false; try { BrowserUtilities.SwitchToFrame(); if (statusType.Equals("Patient Status", StringComparison.InvariantCultureIgnoreCase)) { retVal = Control_ActionUtilities.ClickModalButton(DL_AdvancedSearchWindow.GetPatientStatusCheckbox(status)); } else if (statusType.Equals("Data Stauts", StringComparison.InvariantCultureIgnoreCase)) { retVal = Control_ActionUtilities.ClickModalButton(DL_AdvancedSearchWindow.GetDataStatusCheckbox(status)); } else if (statusType.Equals("Signature Status", StringComparison.InvariantCultureIgnoreCase)) { retVal = Control_ActionUtilities.ClickModalButton(DL_AdvancedSearchWindow.GetSignatureStatusCheckbox(status)); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } BrowserUtilities.SwitchToWindow(); return(retVal); }
public static bool EnterReason(String reason) { try { bool retVal = false; BrowserUtilities.SwitchToFrame(); try { IControl modalHeaderLabel = DL_ModalWindow_ResetCRF.TitleLabel_Step2; if (!Control_PropertyUtilities.IsControlNull(modalHeaderLabel)) { String headerText = Control_PropertyUtilities.GetText(modalHeaderLabel); if (headerText.Equals("Reset Form", StringComparison.InvariantCultureIgnoreCase)) { retVal = Control_ActionUtilities.Textbox_SetText(DL_ModalWindow_ResetCRF.ReasonTextArea, reason, String.Empty); } } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } BrowserUtilities.SwitchToWindow(); return(retVal); } 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 VerifyLabInfo(LabData data) { BrowserUtilities.SwitchToFrame(); bool retVal = false; try { retVal = !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("Lab ID: " + data.LabId)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("Laboratory Name: " + data.LaboratoryName)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("Company: " + data.Company)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("Department: " + data.Department)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("Address 1: " + data.Address1)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("Address 2: " + data.Address2)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("Address 3: " + data.Address3)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("City/Town: " + data.City)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("State/Province: " + data.State)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("Zip/Postal Code: " + data.Zip)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("ISO Country: " + data.ISOCountry)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("Country: " + data.Country)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("Phone: " + data.Phone)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("Fax: " + data.Fax)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("Lab Status: " + data.LaboratoryStatus)) && !Control_PropertyUtilities.IsControlNull(DL_ModalWindow_LabInformation.GetDataCell("Contact Person: " + data.ContactPerson)); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } BrowserUtilities.SwitchToWindow(); return(retVal); }
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 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 AddCommentsToAFlatQuestion(string QuestionPrompt, string Comments) { try { if (SelectAddCommentElementForFlatQuestion(QuestionPrompt)) { BrowserUtilities.SwitchToFrame(); string QuestText = Control_PropertyUtilities.GetText(DL_CRFPage.GetQuestionOnAddCommentModal); if (!QuestText.Contains(QuestionPrompt)) { Control_ActionUtilities.LogException("Verify question prompt on add comments modal.", "Question is not displayed correctly", string.Empty); return(false); } IControl CommentsTextBox = DL_CRFPage.GetTextAreaOnAddCommentModal; Control_ActionUtilities.Textbox_SetText(CommentsTextBox, Comments, "Unable to set comments for the question " + QuestionPrompt); IControl SaveButton = DL_CRFPage.GetButtonOnAddCommentModal("Save"); Control_ActionUtilities.ClickModalButton(SaveButton); BrowserUtilities.SwitchToWindow(); return(true); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool VerifyHeaderAndErrorMessage(String titleText, String bodyMessageText_Partial) { BrowserUtilities.DS_SwitchToConfirmationFrame(); if (IsModalExist_CheckHeaderAndErrorMessage(titleText, bodyMessageText_Partial)) { return(true); } BrowserUtilities.SwitchToWindow(); return(false); }
public static bool ClickContinue(String bodyMessageText_Partial) { BrowserUtilities.SwitchToFrame(); bool isClicked = false; if (BP_ModalWindow.IsModalExist_CheckBodyMessage(bodyMessageText_Partial)) { isClicked = Control_ActionUtilities.ClickModalButton(DL_ModalWindow_ResetSession.ContinueButton); } BrowserUtilities.SwitchToWindow(); return(isClicked); }
public static bool VerifyandClickErrorLink(String popupTitle, String errorMessage, String errorLinkName) { BrowserUtilities.DS_SwitchToConfirmationFrame(); bool isClicked = false; if (IsModalExist_CheckHeaderTextAndErrorLinkMessage(popupTitle, errorMessage)) { isClicked = Control_ActionUtilities.Click_PerssEnterKey(DS_HomePage.GetLink(errorLinkName), "Unable to find link " + errorLinkName + " in Designer Home Page"); } BrowserUtilities.SwitchToWindow(); return(isClicked); }
public static bool ClickYes(String titleText, String bodyMessageText_Partial) { BrowserUtilities.DS_SwitchToFrame(); bool isClicked = false; if (IsModalExist_CheckHeaderTextAndBodyMessage(titleText, bodyMessageText_Partial)) { isClicked = Control_ActionUtilities.ClickModalButton(CodeListsItemDeleteDialog.ClickYesButton); } BrowserUtilities.SwitchToWindow(); return(isClicked); }
public static bool ValidateFrameHeaderText(String ExpectedText) { BrowserUtilities.SwitchToWebFocusFrame(); String actualText = ReadFrameHeaderText(wf_Page_Frame.frameHeader); if (!actualText.ToUpper().Equals(ExpectedText.ToUpper())) { return(false); } BrowserUtilities.SwitchToWindow(); return(true); }
public static bool ClickOk(String titleText, String bodyMessageText) { BrowserUtilities.SwitchToFrame(); bool isClicked = false; if (IsModalExist_VerifyHeaderTextAndBodyMessage(titleText, bodyMessageText)) { isClicked = Control_ActionUtilities.ClickModalButton(DL_ModalWindow.ContinueButton); } BrowserUtilities.SwitchToWindow(); return(isClicked); }
public static bool VerifyStudyContinue(String titleText, String bodyMessageText_Partial) { BrowserUtilities.DS_SwitchToConfirmationFrame(); bool isClicked = false; if (IsModalExist_CheckHeaderTextAndBodyMessage(titleText, bodyMessageText_Partial)) { isClicked = Control_ActionUtilities.ClickModalButton(VerifyStudyPopup.VerifyContinue); } BrowserUtilities.SwitchToWindow(); return(isClicked); }
public static bool DeleteJobsContinue(String titleText, String bodyMessageText_Partial) { BrowserUtilities.DS_SwitchToConfirmationFrame(); bool isClicked = false; //if (DeleteJobsModalExist_CheckHeaderTextAndBodyMessage(titleText, bodyMessageText_Partial)) //{ // isClicked = Control_ActionUtilities.ClickModalButton(DS_ConfirmationPopup.DeleteJobsContinue); //} BrowserUtilities.SwitchToWindow(); return(isClicked); }
public static bool StudyPublishContinueButton() { try { BrowserUtilities.DS_SwitchToFrame(); bool isClicked = Control_ActionUtilities.Click(DS_LabMappingsSpecificationDialog.StudyPublishContinue, String.Empty); BrowserUtilities.SwitchToWindow(); return(isClicked); } catch (Exception e) { } return(false); }
public static bool ClickStudyVersionNextButton() { BrowserUtilities.DS_SwitchToConfirmationFrame(); try { return(Control_ActionUtilities.Click(CompareStudyPopup.NextButton, String.Empty)); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } BrowserUtilities.SwitchToWindow(); return(true); }
public static bool ChangingLabDictPopupOkButton() { try { BrowserUtilities.DS_SwitchToConfirmationFrame(); Control_ActionUtilities.ClickModalButton(DS_ModelDialog.ChangingLabDictOkButton); BrowserUtilities.SwitchToWindow(); return(true); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool ClickContinueButton() { try { BrowserUtilities.DS_SwitchToFrame(); Control_ActionUtilities.ClickModalButton(ManageLabsPage.LabDictContinue); BrowserUtilities.SwitchToWindow(); return(true); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool ClickOnFilter() { BrowserUtilities.DS_SwitchToFrame(); try { ImportLabDictionaryPage.FilterOption.WebElement.Click(); BrowserUtilities.SwitchToWindow(); return(true); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool SaveButton() { BrowserUtilities.DS_SwitchToFrame(); try { Control_ActionUtilities.Click(CodeListsGroupPage.SaveButton, String.Empty); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); return(false); } BrowserUtilities.SwitchToWindow(); return(true); }
public static bool ClickStudyLink(String linkName) { BrowserUtilities.DS_SwitchToFrame(); try { Control_ActionUtilities.Click_PerssEnterKey(DS_HomePage.GetLink(linkName), "Unable to find link " + linkName + " in Designer Home Page"); BrowserUtilities.SwitchToWindow(); return(true); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool StudyPublishLabel(String studyLabel) { try { BrowserUtilities.DS_SwitchToFrame(); Control_ActionUtilities.Textbox_SetText(MapLabDictionary.StudyPublishLabel, studyLabel, String.Empty); BrowserUtilities.SwitchToWindow(); return(true); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); return(false); } }
public static bool ClickError(String error) { BrowserUtilities.DS_SwitchToFrame(); try { IControl errorLink = DS_StudyVerificationMessagesDialog.GetErrorLink(error); Control_ActionUtilities.Click(errorLink, "Unable to click error " + error); BrowserUtilities.SwitchToWindow(); return(true); } catch (Exception e) { } return(false); }
public static bool ClickWarning(String warning) { BrowserUtilities.DS_SwitchToFrame(); try { IControl warningLink = DS_StudyVerificationMessagesDialog.GetWarningLink(warning); Control_ActionUtilities.Click(warningLink, "Unable to click warning " + warning); BrowserUtilities.SwitchToWindow(); return(true); } catch (Exception e) { } return(false); }
public static bool ClickSearchButton() { bool retVal = false; BrowserUtilities.SwitchToFrame(); try { retVal = Control_ActionUtilities.ClickModalButton(DL_AdvancedSearchWindow.SearchButton); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } BrowserUtilities.SwitchToWindow(); return(retVal); }
public static bool SetPatientID(String patientID) { bool retVal = false; try { BrowserUtilities.SwitchToFrame(); retVal = Control_ActionUtilities.Textbox_SetText(DL_AdvancedSearchWindow.PatientIdTextbox, patientID, String.Empty); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } BrowserUtilities.SwitchToWindow(); return(retVal); }
public static bool ClickCancel() { BrowserUtilities.SwitchToFrame(); bool retVal = false; try { retVal = Control_ActionUtilities.ClickModalButton(DL_ModalWindow_ManualDCF.CancelButton); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } BrowserUtilities.SwitchToWindow(); return(retVal); }
public static bool SetAdditionalNotes(String additionalNotes) { bool retVal = false; BrowserUtilities.SwitchToFrame(); try { retVal = Control_ActionUtilities.Textbox_SetText(DL_ModalWindow_DeleteTableRow.AdditionalNotesTextArea, additionalNotes, String.Empty); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } BrowserUtilities.SwitchToWindow(); return(retVal); }
public static bool ClickContinue(String titleText) { BrowserUtilities.SwitchToFrame(); bool isClicked = false; try { isClicked = Click(titleText, DL_ModalWindow_CRF_QueriesResult.ContinueButton); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } BrowserUtilities.SwitchToWindow(); return(isClicked); }