at.willhaben.willtest.proxy.ProxyOptionModifier 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 at.willhaben.willtest.junit5.OptionModifier;
import net.lightbody.bmp.BrowserMobProxy;
import org.openqa.selenium.MutableCapabilities;
import org.openqa.selenium.remote.CapabilityType;
public class ProxyOptionModifier implements OptionModifier {
private BrowserMobProxy proxy;
public ProxyOptionModifier(BrowserMobProxy proxy) {
this.proxy = proxy;
}
@Override
public T modifyAllBrowsers(T options) {
options.setCapability(CapabilityType.PROXY, BrowserProxyBuilder.createSeleniumProxy(proxy));
options.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);
return options;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy