You can possibly specify the IP in the node configuration json file on your node machine:
{
"capabilities":
[
{
"platform": "WINDOWS",
"browserName": "firefox",
"maxInstances": 1,
"seleniumProtocol": "WebDriver",
"nodeip": "192.168.0.123"
}
],
"configuration":
{
"proxy":"org.openqa.grid.selenium.proxy.WebDriverRemoteProxy",
"maxSession":1,
"url":"http://192.168.0.99:4444/wd/hub"
}
}
And then request the specific node:
DesiredCapabilities caps = DesiredCapabilities.firefox();
caps.setCapability("platform", Platform.WINDOWS);
caps.setCapability("nodeip", "192.168.0.123");
RemoteWebDriver driver = new RemoteWebDriver(new URL(hubUrl), caps);
Alternatively, you can possibly use the applicationName
capability or the Browser Version
capability to specify your IP/custom value as selenium grid does a simple string match on these. See the below google group discussions on using existing capabilities for identifying a specific node: