Complete the code to start a Selenium Grid hub.
Hub hub = new Hub(new HubConfiguration());
hub.[1]();The start() method is used to start the Selenium Grid hub server.
Complete the code to register a node to the Selenium Grid hub.
Node node = new Node(new NodeConfiguration());
node.[1](hub.getUrl());The register() method is used to register a node with the hub URL.
Fix the error in the code to create a RemoteWebDriver connected to the Selenium Grid hub.
RemoteWebDriver driver = new RemoteWebDriver(new URL([1]), new ChromeOptions());The URL must be a properly formatted string with protocol and path, enclosed in quotes.
Fill both blanks to configure the node with the hub URL and specify the browser type.
NodeConfiguration config = new NodeConfiguration(); config.setHubUrl([1]); config.setBrowserName([2]);
The hub URL must be a full URL string, and the browser name should be set to a valid browser like 'chrome'.
Fill all three blanks to create a DesiredCapabilities object, set browser and platform, and start the RemoteWebDriver.
DesiredCapabilities caps = new DesiredCapabilities(); caps.setBrowserName([1]); caps.setPlatform([2]); RemoteWebDriver driver = new RemoteWebDriver(new URL([3]), caps);
Set browser name to 'chrome', platform to Platform.WINDOWS, and provide the full hub URL string.