at.willhaben.willtest.proxy.BrowserProxyBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Core classes with as few dependencies as possible
package at.willhaben.willtest.proxy;
import net.lightbody.bmp.BrowserMobProxy;
import net.lightbody.bmp.BrowserMobProxyServer;
import org.openqa.selenium.Proxy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class BrowserProxyBuilder {
private static final Logger LOGGER = LoggerFactory.getLogger(BrowserProxyBuilder.class);
private BrowserProxyBuilder() {
}
public static BrowserProxyBuilder builder() {
return new BrowserProxyBuilder();
}
public static Proxy createSeleniumProxy(BrowserMobProxy proxy) {
return new SeleniumProxy(proxy);
}
public BrowserMobProxy startProxy() {
LOGGER.info("Starting Proxy...");
BrowserMobProxyServer proxy = new BrowserMobProxyServer();
proxy.start();
return proxy;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy