use of org.openqa.grid.internal.utils.configuration.GridNodeConfiguration in project zalenium by zalando.
the class TestUtils method getNewBasicRemoteProxy.
public static DockerSeleniumRemoteProxy getNewBasicRemoteProxy(String browser, String url, GridRegistry registry) throws MalformedURLException {
GridNodeConfiguration config = new GridNodeConfiguration();
URL u = new URL(url);
config.host = u.getHost();
config.port = u.getPort();
config.role = "webdriver";
RegistrationRequest req = RegistrationRequest.build(config);
req.getConfiguration().capabilities.clear();
DesiredCapabilities capability = new DesiredCapabilities();
capability.setBrowserName(browser);
req.getConfiguration().capabilities.add(capability);
return createProxy(registry, req);
}
use of org.openqa.grid.internal.utils.configuration.GridNodeConfiguration in project zalenium by zalando.
the class TestUtils method getRegistrationRequestForTesting.
public static RegistrationRequest getRegistrationRequestForTesting(final int port, String proxyClass) {
GridNodeConfiguration nodeConfiguration = new GridNodeConfiguration();
nodeConfiguration.role = "wd";
nodeConfiguration.hub = "http://localhost:4444";
nodeConfiguration.host = "localhost";
nodeConfiguration.port = port;
nodeConfiguration.proxy = proxyClass;
nodeConfiguration.registerCycle = 5000;
nodeConfiguration.cleanUpCycle = 5000;
nodeConfiguration.maxSession = 5;
new JCommander(nodeConfiguration);
return RegistrationRequest.build(nodeConfiguration);
}
Aggregations