Two methods for making tests parallel on the JDI 2 Framework

Anton Karpenko
2019-01-09T12:23:10Z

JDI parallel tests

| /**
| * In TestsInit add one from two methods
| */
|
| /**
| * First method.
| * Clean cookies and refresh page.
| */
| @AfterMethod(alwaysRun = true)
| public static void cleanBrowser(){
| WebDriverFactory.getDriver().manage().deleteAllCookies();
| WebPage.currentPage.refresh();
| }
|
| /**
| * Second method.
| * Reopen browser if it opened.
| */
| @BeforeMethod(alwaysRun = true)
| public static void rerunDriver(){
| if (WebDriverFactory.hasRunDrivers()){
| WebDriverFactory.reopenDriver();
| }
| }