Where do we use this Constructor RemoteWebDriver(java.net.URL remoteAddress, Capabilities desiredCapabilities, Capabilities requiredCapabilities)

孤者浪人 提交于 2019-12-13 02:12:55

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!