diff --git a/src/test/java/com/lazerycode/selenium/DriverFactory.java b/src/test/java/com/lazerycode/selenium/DriverFactory.java index 3190d6fa..8ad824c3 100644 --- a/src/test/java/com/lazerycode/selenium/DriverFactory.java +++ b/src/test/java/com/lazerycode/selenium/DriverFactory.java @@ -1,6 +1,5 @@ package com.lazerycode.selenium; -import com.lazerycode.selenium.config.DriverType; import com.lazerycode.selenium.config.WebDriverThread; import com.lazerycode.selenium.listeners.ScreenshotListener; import org.openqa.selenium.WebDriver; @@ -19,25 +18,6 @@ public class DriverFactory { private static List webDriverThreadPool = Collections.synchronizedList(new ArrayList()); private static ThreadLocal driverThread; - public DriverFactory() { - setBinaryVariables(); - } - - private void setBinaryVariables() { - for (DriverType driverType : DriverType.values()) { - String variable = driverType.getWebDriverSystemPropertyKey(); - if (null != variable) { - String systemProperty = System.getProperty(variable); - if (null == systemProperty || systemProperty.isEmpty()) { - String environmentalVariable = System.getenv(variable); - if (null != environmentalVariable && !environmentalVariable.isEmpty()) { - System.setProperty(variable, environmentalVariable); - } - } - } - } - } - @BeforeSuite public static void instantiateDriverObject() { driverThread = new ThreadLocal() { diff --git a/src/test/java/com/lazerycode/selenium/config/DriverType.java b/src/test/java/com/lazerycode/selenium/config/DriverType.java index 2588f16b..fc9f9b70 100644 --- a/src/test/java/com/lazerycode/selenium/config/DriverType.java +++ b/src/test/java/com/lazerycode/selenium/config/DriverType.java @@ -43,11 +43,6 @@ public DesiredCapabilities getDesiredCapabilities(Proxy proxySettings) { public WebDriver getWebDriverObject(DesiredCapabilities capabilities) { return new ChromeDriver(capabilities); } - - @Override - public String getWebDriverSystemPropertyKey() { - return "webdriver.chrome.driver"; - } }, IE { public DesiredCapabilities getDesiredCapabilities(Proxy proxySettings) { @@ -61,11 +56,6 @@ public DesiredCapabilities getDesiredCapabilities(Proxy proxySettings) { public WebDriver getWebDriverObject(DesiredCapabilities capabilities) { return new InternetExplorerDriver(capabilities); } - - @Override - public String getWebDriverSystemPropertyKey() { - return "webdriver.ie.driver"; - } }, SAFARI { public DesiredCapabilities getDesiredCapabilities(Proxy proxySettings) { @@ -87,11 +77,6 @@ public DesiredCapabilities getDesiredCapabilities(Proxy proxySettings) { public WebDriver getWebDriverObject(DesiredCapabilities capabilities) { return new OperaDriver(capabilities); } - - @Override - public String getWebDriverSystemPropertyKey() { - return "webdriver.opera.driver"; - } }, PHANTOMJS { public DesiredCapabilities getDesiredCapabilities(Proxy proxySettings) { @@ -109,18 +94,8 @@ public DesiredCapabilities getDesiredCapabilities(Proxy proxySettings) { public WebDriver getWebDriverObject(DesiredCapabilities capabilities) { return new PhantomJSDriver(capabilities); } - - @Override - public String getWebDriverSystemPropertyKey() { - return "phantomjs.binary.path"; - } }; - - public String getWebDriverSystemPropertyKey() { - return null; - } - protected DesiredCapabilities addProxySettings(DesiredCapabilities capabilities, Proxy proxySettings) { if (null != proxySettings) { capabilities.setCapability(PROXY, proxySettings);