From 43c9f8a3cc97424fe907879d16ef55384895121c Mon Sep 17 00:00:00 2001 From: Stefan Ludwig Date: Wed, 15 Mar 2017 22:52:12 +0100 Subject: [PATCH] fixed issue with certain browsers, when defining no proxy configuration --- .../testit/webtester/browser/factories/BaseBrowserFactory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webtester-core/src/main/java/info/novatec/testit/webtester/browser/factories/BaseBrowserFactory.java b/webtester-core/src/main/java/info/novatec/testit/webtester/browser/factories/BaseBrowserFactory.java index 93a0bdc5..157d9496 100644 --- a/webtester-core/src/main/java/info/novatec/testit/webtester/browser/factories/BaseBrowserFactory.java +++ b/webtester-core/src/main/java/info/novatec/testit/webtester/browser/factories/BaseBrowserFactory.java @@ -10,6 +10,7 @@ import info.novatec.testit.webtester.browser.Browser; import info.novatec.testit.webtester.browser.BrowserFactory; import info.novatec.testit.webtester.browser.WebDriverBrowser; +import info.novatec.testit.webtester.browser.proxy.NoProxyConfiguration; import info.novatec.testit.webtester.browser.proxy.ProxyConfiguration; @@ -61,7 +62,7 @@ public Browser createBrowser(WebDriver webDriver) { } protected void setOptionalProxyConfiguration(DesiredCapabilities capabilities) { - if (proxyConfiguration != null) { + if (proxyConfiguration != null && !(proxyConfiguration instanceof NoProxyConfiguration)) { Proxy proxy = new Proxy(); proxyConfiguration.configureProxy(proxy); capabilities.setCapability(CapabilityType.PROXY, proxy);