Skip to content

Commit

Permalink
Test refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
wakaleo committed Sep 29, 2016
1 parent ad24564 commit c4a5879
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
package net.serenitybdd.core.support;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriverService;
import org.openqa.selenium.remote.DesiredCapabilities;

public class ChromeService extends ManagedDriverService{
public ChromeService() {
super(new ChromeDriverService.Builder()
.usingAnyFreePort()
.build());
}
public WebDriver newDriver() {
return newDriver(DesiredCapabilities.chrome());
}

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package net.thucydides.core.pages.integration;


import net.serenitybdd.core.support.ManagedDriverService;
import net.serenitybdd.core.support.ChromeService;
import net.thucydides.core.steps.StepEventBus;
import net.thucydides.core.webdriver.StaticTestSite;
import org.junit.After;
Expand All @@ -19,11 +19,11 @@ public class FluentElementAPITestsBaseClass {
private static WebDriver driver;
private static StaticSitePage staticSitePage;

private static ManagedDriverService chromeService;
private static ChromeService chromeService;

@BeforeClass
public static void openBrowsers() throws IOException {
chromeService = new ManagedDriverService();
chromeService = new ChromeService();
chromeService.start();
StepEventBus.getEventBus().clear();

Expand Down

0 comments on commit c4a5879

Please sign in to comment.