diff --git a/serenity-core/src/main/java/net/serenitybdd/core/support/ChromeService.java b/serenity-core/src/main/java/net/serenitybdd/core/support/ChromeService.java index d1c0b5b473..4b144b54d8 100644 --- a/serenity-core/src/main/java/net/serenitybdd/core/support/ChromeService.java +++ b/serenity-core/src/main/java/net/serenitybdd/core/support/ChromeService.java @@ -1,6 +1,8 @@ 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() { @@ -8,4 +10,8 @@ public ChromeService() { .usingAnyFreePort() .build()); } + public WebDriver newDriver() { + return newDriver(DesiredCapabilities.chrome()); + } + } diff --git a/serenity-core/src/test/java/net/thucydides/core/pages/integration/FluentElementAPITestsBaseClass.java b/serenity-core/src/test/java/net/thucydides/core/pages/integration/FluentElementAPITestsBaseClass.java index 15de01153c..0d1c845538 100644 --- a/serenity-core/src/test/java/net/thucydides/core/pages/integration/FluentElementAPITestsBaseClass.java +++ b/serenity-core/src/test/java/net/thucydides/core/pages/integration/FluentElementAPITestsBaseClass.java @@ -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; @@ -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();