The hub will reject the request from the test script when the test script asks for a capability that is not registered with the hub. Let's modify the preceding test script to request the Opera browser instead of Chrome. The test script should look as follows:
@BeforeMethodpublic void setup() throws MalformedURLException { DesiredCapabilities caps = new DesiredCapabilities(); caps.setBrowserName("opera"); caps.setPlatform(Platform.MAC); driver = new RemoteWebDriver(new URL("http://192.168.0.101:1111/wd/hub"), caps); driver.get("http://demo-store.seleniumacademy.com/");}
The hub checks whether there is any node that matches the desired capabilities. If it doesn't find one (as in this case), it will ...