Ejemplo n.º 1
0
 /// <summary>
 /// Method to Validate the Sent Email's Subject Line Text.
 /// </summary>
 /// <param name="driver">IWebDriver Object</param>
 /// <param name="report">TestReporting Class Object</param>
 /// <param name="subjectLineText">Subject Line Text String</param>
 public static void ValidateSubjectLineTextElement(this IWebDriver driver, TestReporting report, string subjectLineText)
 {
     try
     {
         Assert.True(driver.FindElement(By.XPath("//h2[contains(text(),'" + subjectLineText + "')]")).Displayed);
         report.SetStepStatusPass("Email's Subject Line Element Validated as: " + subjectLineText);
     }
     catch (Exception e)
     {
         report.SetStepStatusFail("Email's Subject Line Element Validation Failed.");
         report.AddTestFailureScreenshot(SeleniumKeywordActions.ScreenCaptureAsBase64String(driver));
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Method to Validate the Sent Email's Attachment Name Text.
 /// </summary>
 /// <param name="driver">IWebDriver Object</param>
 /// <param name="report">TestReporting Class Object</param>
 /// <param name="attachmentFileName">Attachment File Name String</param>
 public static void ValidateAttachmentNameTextElement(this IWebDriver driver, TestReporting report, string attachmentFileName)
 {
     try
     {
         Assert.True(driver.FindElement(By.XPath("//*[text()='" + attachmentFileName + "']")).Displayed);
         report.SetStepStatusPass("Email's Attachment Name Element Validated as: " + attachmentFileName);
     }
     catch (Exception e)
     {
         report.SetStepStatusFail("Email's Attachment Name Element Validation Failed.");
         report.AddTestFailureScreenshot(SeleniumKeywordActions.ScreenCaptureAsBase64String(driver));
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Method to Validate the Sent Email's Label As 'Social'
 /// </summary>
 /// <param name="driver">IWebDriver Object</param>
 /// <param name="report">TestReporting Class Object</param>
 public static void ValidateSocialLabelElement(this IWebDriver driver, TestReporting report)
 {
     try
     {
         Assert.True(driver.FindElement(By.XPath("//*[@name='^smartlabel_social']")).Displayed);
         report.SetStepStatusPass("Email's label Validated as : 'Social'");
     }
     catch (Exception e)
     {
         report.SetStepStatusFail("Email's Label Validation Failed.");
         report.AddTestFailureScreenshot(SeleniumKeywordActions.ScreenCaptureAsBase64String(driver));
     }
 }