问题
I was going through Webdriver API and come across a constructor in RemoteWebdriver for which i didn't find any information.
I have used the below constructor to configure selenium grid
RemoteWebDriver(java.net.URL remoteAddress, Capabilities desiredCapabilities)
Here is an other constructor which is there exactly below that, 'Capabilities requiredCapabilities'
RemoteWebDriver(java.net.URL remoteAddress,
Capabilities desiredCapabilities, Capabilities requiredCapabilities)
Can any one please let me know where this can be applied.
回答1:
According to the changelog for 2.25.0:
Added support for "requiredCapabilities" to the remote webdrivers and implemented basic support for these in the firefox driver. Failure to fulfull a required capability will cause a
SessionNotCreatedException
to be thrown.
回答2:
Currently you needn't worry about the requiredCapabilities
, because it's been deprecated in Selenium v3.4.0. Use desiredCapabilities
instead.
来源:https://stackoverflow.com/questions/35312618/where-do-we-use-this-constructor-remotewebdriverjava-net-url-remoteaddress-cap