Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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);
 }