public static bool SelectLabIDItemForDomain(String itemName, String Domain) { try { return(Control_ActionUtilities.Dropdown_SelectItem(LabMappingsPage.SelectLabIdForDomain(Domain), itemName, "Unable to select " + itemName)); } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static Boolean ClickExpandCollapse(String SectionName) { try { if (Control_ActionUtilities.Click(LabMappingsPage.ExpandCollapseForSection(SectionName), "Element not clickable")) { return(true); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static bool ClickEditButtonOnLabMappingsPage(String field) { try { if (LabMappingsPage.EditButtonForAttributeMappingField(field) != null) { LabMappingsPage.EditButtonForAttributeMappingField(field).WebElement.Click(); return(true); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }
public static Boolean VerifyExpandCollapsePresentForEachSection() { try { List <IControl> expandCollapse = LabMappingsPage.ExpandCollapseButtonForAllSections(); for (int i = 5; i < 10; i++) { if (!Control_PropertyUtilities.IsControlDisplayed(expandCollapse[i])) { return(false); } } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(true); }
public static bool ValidateLengthOfControl(String DomainName, String ItemName) { try { if (LabMappingsPage.SelectionLabMappingDomainDropDown.SelectElement.SelectedOption.Text.Length == DomainName.Length && LabMappingsPage.SelectLabIdForDomain(DomainName).SelectElement.SelectedOption.Text.Length == ItemName.Length) { return(true); //Console.Write(LabMappingsPage.SelectionLabMappingDomainDropDown.WebElement.GetCssValue("width")); } else { return(false); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(false); }