Exemplo n.º 1
0
 public static void FailTest(string failMsg)
 {
     ReportProvider.LogInfoInAllReporters(AventStack.ExtentReports.Status.Fail,
                                          $"Test failed: \n'{failMsg}'");
     Assert.Fail(failMsg);
     BaseSteps.TearDown();
 }
 public static IWebDriver GenerateWebDriver(Browser browser)
 {
     WebDriver = GetDriver(browser);
     ReportProvider.LogInfoInAllReporters(Status.Info, $"Browser selected: {browser}");
     WebElementExtensions.SetWebDriver(WebDriver);
     return(WebDriver);
 }
Exemplo n.º 3
0
 public static void EqualsHardAssert(object expectedValue, object actualValue, string assertionMsg)
 {
     ReportProvider.LogInfoInAllReporters(AventStack.ExtentReports.Status.Info,
                                          $"Comparing if two elements are equal. \nExpected value: '{expectedValue}' \nActual value: '{actualValue}'");
     Assert.AreEqual(expectedValue, actualValue, assertionMsg);
 }
Exemplo n.º 4
0
 internal static void NotContains(string expectedValue, string actualValue, string assertionMsg)
 {
     ReportProvider.LogInfoInAllReporters(AventStack.ExtentReports.Status.Info,
                                          $"Verifying if the actual value not contains the expected one: \nExpected value: '{expectedValue}' \nActual value: '{actualValue}'");
     Assert.IsFalse(actualValue.Contains(expectedValue), assertionMsg);
 }
Exemplo n.º 5
0
 public static void IsFalseHardAssert(bool actualValue, string assertionMsg)
 {
     ReportProvider.LogInfoInAllReporters(AventStack.ExtentReports.Status.Info,
                                          $"Verifying if the element is false: \nActual value: '{actualValue}'");
     Assert.IsFalse(actualValue, assertionMsg);
 }