public static Boolean ValidateMessageOnPage(String message) { try { if (!Control_PropertyUtilities.compareMessage(DL_LabManagementPage.MessageOnLabManagementPage, message)) { Console.WriteLine("Message is not correct. Message on page is:" + DL_LabManagementPage.MessageOnLabManagementPage.WebElement.Text); return(false); } if (DL_LabManagementPage.MessageOnLabManagementPage.WebElement.GetCssValue("color") != "rgba(255, 0, 0, 1)") { Console.WriteLine("Message color is:" + DL_LabManagementPage.MessageOnLabManagementPage.WebElement.GetCssValue("color")); return(false); } if (!Control_PropertyUtilities.CompareCSSValue(DL_LabManagementPage.MessageOnLabManagementPage, "text-align", "center")) { Console.WriteLine("Text is aligned in:" + DL_LabManagementPage.MessageOnLabManagementPage.WebElement.GetCssValue("text-align")); return(false); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(true); }
public static Boolean ValidateMessageOnRunNormalizationPage(String message) { try { if (!Control_PropertyUtilities.compareMessage(DL_LabManagementPage.MessageOnRunNormalizationPage, message)) { Console.WriteLine("Message is not correct. Message on page is:" + DL_LabManagementPage.MessageOnRunNormalizationPage.WebElement.Text); return(false); } } catch (Exception e) { new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e); } return(true); }