servlets =
Arrays.asList(new String[]{IOSProxyStateUpdaterServlet.class.getCanonicalName()});
c.setServlets(servlets);
hub = new org.openqa.grid.web.Hub(c);
Registry registry = hub.getRegistry();
proxyApi = new URL("http://" + hub.getHost() + ":" + hub.getPort() + "/grid/admin/IOSProxyStateUpdaterServlet/");
host = new HttpHost(hub.getHost(), hub.getPort());
hub.start();
org.openqa.grid.common.RegistrationRequest
req =
new org.openqa.grid.common.RegistrationRequest();
Map<String, Object> capability = new HashMap<String, Object>();
capability.put(CapabilityType.BROWSER_NAME, "Mobile safari");
req.addDesiredCapability(capability);
Map<String, Object> config = new HashMap<String, Object>();
config.put(org.openqa.grid.common.RegistrationRequest.REMOTE_HOST, "http://localhost:5555");
req.setConfiguration(config);
remoteProxy = new IOSMutableRemoteProxy(req, registry);
registry.add(remoteProxy);
Map<String, Object> cap = new HashMap<String, Object>();
cap.put(CapabilityType.BROWSER_NAME, "app1");
}