Customized CapabilityMatcher

By default, the hub will use the org.openqa.grid.internal.utils. DefaultCapabilityMatcher class to match the requested node. If you do not like the implementation logic of the DefaultCapabilityMatcher class, you can extend the class, implement your own CapabilityMatcher class, and provide your own logic in it.

Once developed, you can ask the hub to use that class to match the capabilities with the nodes, using a configuration parameter named capabilityMatcher. The command to achieve this is as follows:

java -jar selenium-server-standalone-3.12.0.jar -role hub -port 1111 -capabilityMatcher com.yourcomp.CustomCapabilityMatcher

The hub will use the logic defined in your CustomCapabilityMatcher class to identify ...

Get Selenium WebDriver 3 Practical Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.