尝试在本地运行一些 Selenium 测试,Selenium 3.0
但出现以下错误:
org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{marionette=true, screen-resolution=1680x1050, commandTimeout=300, record-video=true, version=50.1.0, platform=MAC, tags=[Ljava.lang.String;@1ac4da8f, build=jgilmore-12291406, idleTimeout=120, name=homePageSmokeTest, browserName=firefox, seleniumVersion=null, maxDuration=360}], required capabilities = Capabilities [{}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700
当前运行 Selenium Hub 如下:
java -jar /Users/jgilmore/Selenium/selenium-server-standalone-3.0.1.jar -role hub -timeout 15
和节点(尝试首先运行 Firefox 50.1.0 Geckodriver
):
java -Dwebdriver.gecko.driver=/Users/jgilmore/Selenium/geckodriver -jar selenium-server-standalone-3.0.1.jar -port 5557 -role node -hub http://localhost:4444/grid/register -browser "browserName=firefox, browserVersion=50.1.0, maxInstances=10"
Grid 和 Node 启动得很好(在 Grid Console 中查看它们),但是在尝试运行我的测试时我无法创建 WebDriver 实例。这曾经对我使用 Selenium 2.x,所以我假设我在这里遗漏了一些东西。任何帮助表示赞赏!