Complete the code to start a Selenium Grid hub using the command line.
java -jar selenium-server-[1].jar hubThe correct command to start the Selenium Grid hub uses the server jar file: selenium-server.jar.
Complete the code to register a node to the Selenium Grid hub.
java -jar selenium-server-[1].jar node --hub http://localhost:4444/grid/register
Nodes are started using the same server jar file as the hub, so the correct jar is selenium-server.jar.
Fix the error in the Python code to create a remote WebDriver session on the Selenium Grid hub.
from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities driver = webdriver.Remote( command_executor='http://localhost:4444/wd/hub', desired_capabilities=[1] )
The correct attribute for Chrome capabilities is DesiredCapabilities.CHROME in uppercase.
Fill both blanks to create a dictionary of desired capabilities for Firefox with JavaScript enabled.
capabilities = {
'browserName': [1],
'javascriptEnabled': [2]
}The browser name for Firefox is 'firefox' and JavaScript should be enabled with True.
Fill all three blanks to create a Selenium Grid node configuration dictionary with max sessions 5, port 5555, and hub URL.
node_config = {
'maxSession': [1],
'port': [2],
'hub': '[3]'
}The maxSession should be 5, port 5555, and the hub URL is http://localhost:4444/grid/register for node registration.