diff --git a/core/worker/src/main/java/com/cognifide/aet/worker/drivers/firefox/FirefoxCommunicationWrapperImpl.java b/core/worker/src/main/java/com/cognifide/aet/worker/drivers/firefox/FirefoxCommunicationWrapperImpl.java index 6a9252063..7593a2d30 100644 --- a/core/worker/src/main/java/com/cognifide/aet/worker/drivers/firefox/FirefoxCommunicationWrapperImpl.java +++ b/core/worker/src/main/java/com/cognifide/aet/worker/drivers/firefox/FirefoxCommunicationWrapperImpl.java @@ -84,4 +84,4 @@ public HttpRequestExecutor getHttpRequestExecutor() { return requestExecutor; } -} \ No newline at end of file +} diff --git a/core/worker/src/main/java/com/cognifide/aet/worker/drivers/firefox/FirefoxProfileBuilder.java b/core/worker/src/main/java/com/cognifide/aet/worker/drivers/firefox/FirefoxProfileBuilder.java index 010c9f9ea..f7d9e9b2b 100644 --- a/core/worker/src/main/java/com/cognifide/aet/worker/drivers/firefox/FirefoxProfileBuilder.java +++ b/core/worker/src/main/java/com/cognifide/aet/worker/drivers/firefox/FirefoxProfileBuilder.java @@ -32,11 +32,11 @@ private FirefoxProfileBuilder() { firefoxProfile = new FirefoxProfile(); } - static FirefoxProfileBuilder newInstance() { + public static FirefoxProfileBuilder newInstance() { return new FirefoxProfileBuilder(); } - FirefoxProfileBuilder withJavaScriptErrorCollectorPlugin() { + public FirefoxProfileBuilder withJavaScriptErrorCollectorPlugin() { try { JavaScriptError.addExtension(firefoxProfile); } catch (IOException e) { @@ -45,34 +45,34 @@ FirefoxProfileBuilder withJavaScriptErrorCollectorPlugin() { return this; } - FirefoxProfileBuilder withUnstableAndFastLoadStrategy() { + public FirefoxProfileBuilder withUnstableAndFastLoadStrategy() { firefoxProfile.setPreference("webdriver.load.strategy", "unstable"); return this; } - FirefoxProfileBuilder withLogfilePath(String logfilePath) { + public FirefoxProfileBuilder withLogfilePath(String logfilePath) { firefoxProfile.setPreference("webdriver.firefox.logfile", logfilePath); return this; } - FirefoxProfileBuilder withFlashSwitchedOff() { + public FirefoxProfileBuilder withFlashSwitchedOff() { firefoxProfile.setPreference("plugin.state.flash", 0); return this; } - FirefoxProfileBuilder withDevtoolsStorageEnabled() { + public FirefoxProfileBuilder withDevtoolsStorageEnabled() { firefoxProfile.setPreference("devtools.storage.enabled", true); return this; } - FirefoxProfileBuilder withAllCookiesAccepted() { + public FirefoxProfileBuilder withAllCookiesAccepted() { firefoxProfile.setPreference("network.cookie.cookieBehavior", 0); firefoxProfile.setPreference("network.cookie.alwaysAcceptSessionCookies", true); return this; } - FirefoxProfileBuilder withRandomPort() { + public FirefoxProfileBuilder withRandomPort() { firefoxProfile .setPreference(FirefoxProfile.PORT_PREFERENCE, new Random().nextInt(64510) + 1024); return this; @@ -96,17 +96,17 @@ FirefoxProfileBuilder withClearingCacheAfterBrowserShutdown() { * The possible settings are: 0 = default, 1 = aliased, 2 = GDI Classic, 3 = GDI Natural, 4 = * Natural, 5 = Natural Symmetric */ - FirefoxProfileBuilder withForcedAliasing() { + public FirefoxProfileBuilder withForcedAliasing() { firefoxProfile.setPreference("gfx.font_rendering.cleartype_params.rendering_mode", 0); return this; } - FirefoxProfileBuilder withUpdateDisabled() { + public FirefoxProfileBuilder withUpdateDisabled() { firefoxProfile.setPreference("app.update.enabled", false); return this; } - FirefoxProfile build() { + public FirefoxProfile build() { return firefoxProfile; } } diff --git a/core/worker/src/main/java/com/cognifide/aet/worker/drivers/firefox/FirefoxWebDriverFactory.java b/core/worker/src/main/java/com/cognifide/aet/worker/drivers/firefox/local/FirefoxWebDriverFactory.java similarity index 96% rename from core/worker/src/main/java/com/cognifide/aet/worker/drivers/firefox/FirefoxWebDriverFactory.java rename to core/worker/src/main/java/com/cognifide/aet/worker/drivers/firefox/local/FirefoxWebDriverFactory.java index 9855103db..e020d128a 100644 --- a/core/worker/src/main/java/com/cognifide/aet/worker/drivers/firefox/FirefoxWebDriverFactory.java +++ b/core/worker/src/main/java/com/cognifide/aet/worker/drivers/firefox/local/FirefoxWebDriverFactory.java @@ -13,12 +13,14 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -package com.cognifide.aet.worker.drivers.firefox; +package com.cognifide.aet.worker.drivers.firefox.local; import static com.cognifide.aet.worker.drivers.WebDriverHelper.NAME; import static com.cognifide.aet.worker.drivers.WebDriverHelper.NAME_LABEL; import static com.cognifide.aet.worker.drivers.WebDriverHelper.PATH; +import com.cognifide.aet.worker.drivers.firefox.FirefoxCommunicationWrapperImpl; +import com.cognifide.aet.worker.drivers.firefox.FirefoxProfileBuilder; import com.cognifide.aet.job.api.collector.HttpRequestExecutorFactory; import com.cognifide.aet.job.api.collector.ProxyServerWrapper; import com.cognifide.aet.job.api.collector.WebCommunicationWrapper;