I have the following requirement. I should be able to dynamically provide port number to the params to pass in
webdriver.remote.webdriver.WebDriver(<PARAMS HERE>)
I tried many combinations but unable to figure it out
command = "command_executor='http://127.0.0.1:4444/wd/hub', desired_capabilities=webdriver.DesiredCapabilities.HTMLUNIT"
driver = webdriver.remote.webdriver.WebDriver(command)
I get the following error:
Traceback (most recent call last):
File "sel2.py", line 38, in <module>
driver = webdriver.remote.webdriver.WebDriver(command)
File "/home/sysqe/my36project/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 134, in __init__
raise WebDriverException("Desired Capabilities can't be None")
selenium.common.exceptions.WebDriverException: Message: Desired Capabilities can't be None
it should be able to interpolate the var command and put the params in the place.