All Downloads are FREE. Search and download functionalities are using the official Maven repository.

at.willhaben.willtest.proxy.ProxyOptionModifier Maven / Gradle / Ivy

There is a newer version: 3.1.10
Show newest version
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