Skip to content
Snippets Groups Projects
Verified Commit b0017c9c authored by Julien Wittouck's avatar Julien Wittouck
Browse files

:sparkles: : use assertThat

parent 820c8b32
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ import org.openqa.selenium.support.ui.Select;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
public class AssertionMethods extends SelectElementByType implements BaseTest {
......@@ -34,11 +35,13 @@ public class AssertionMethods extends SelectElementByType implements BaseTest {
String pageTitle = getPageTitle();
if (testCase) {
if (!pageTitle.equals(title))
fail("Page Title Not Matched, Actual Page Title : " + pageTitle);
assertThat(pageTitle)
.as("check page title")
.isEqualTo(title);
} else {
if (pageTitle.equals(title))
fail("Page Title Matched, Actual Page Title : " + pageTitle);
assertThat(pageTitle)
.as("check page title")
.isNotEqualTo(title);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment