PHPUnit Selenium无法运行phantomjs / ghostdriver测试

时间:2014-06-03 19:11:47

标签: php phpunit

我启动网格服务 - java -jar selenium-server-standalone-2.42.1.jar -role hub 我启动phantomjs - phantomjs --webdriver = --webdriver-selenium-grid-hub = {hubip / port}

我运行phpunit,输出是: RuntimeException:在'http:// {hubip / port} / selenium-server / driver /'

访问Selenium Server时响应无效
    org.openqa.grid.common.exception.GridException: Error forwarding the new session The server returned an error : Unknown Command - 
{"headers":
{"Accept":"*/*","Accept-Encoding":"gzip,deflate","Connection":"Keep-Alive","Content-Length":"67","Content-Type":"application/x-www-form-urlencoded; charset=utf-8","Host":"","User-Agent":"Apache-HttpClient/4.3.2 (java 1.5)"},
"httpVersion":"1.1","method":"POST","post":"cmd=getNewBrowserSession&1=phantomjs&2=;","url":"/","urlParsed":
{"anchor":"","query":"","file":"","directory":"/","path":"/","relative":"/","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/","queryKey":{},"chunks":[""]}
}

我可以让firefox正常工作,所以我认为前两个命令可以正常工作。

phantomjs版本也是1.9.7

0 个答案:

没有答案