Selenium webdriver 硒+;facebook php webdriver:无法创建新服务:ChromeDriverService

Selenium webdriver 硒+;facebook php webdriver:无法创建新服务:ChromeDriverService,selenium-webdriver,Selenium Webdriver,我正在尝试使用facebook php webdriver设置Selenium。这就是我所做的: Ran composer需要facebook/webdriver来安装软件包 已在端口4444上启动selenium服务器(默认) 从下载了最新的32位chromedriver(没有单独的64位可用) 已将chromedriver.exe复制到项目文件夹(不知道是否有必要) 指定的铬驱动程序。默认情况下,它在端口9515上运行 运行脚本以在chrome中打开浏览器窗口 在下面的脚本中,我在第三行

我正在尝试使用facebook php webdriver设置Selenium。这就是我所做的:

  • Ran composer需要facebook/webdriver来安装软件包
  • 已在端口4444上启动selenium服务器(默认)
  • 从下载了最新的32位chromedriver(没有单独的64位可用)
  • 已将chromedriver.exe复制到项目文件夹(不知道是否有必要)
  • 指定的铬驱动程序。默认情况下,它在端口9515上运行
  • 运行脚本以在chrome中打开浏览器窗口
在下面的脚本中,我在第三行得到一个错误

$host = 'http://localhost:4444/wd/hub'; // this is the default
$capabilities = DesiredCapabilities::chrome();
$driver = RemoteWebDriver::create($host, $capabilities);
错误:

Fatal error: Uncaught Facebook\WebDriver\Exception\SessionNotCreatedException: Unable to create new service: ChromeDriverService Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:33:15.31Z' System info: host: 'WINCOM', ip: '192.168.0.10', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '9.0.1' Driver info: driver.version: unknown in C:\xampp\htdocs\xampp\testnew\vendor\facebook\webdriver\lib\Exception\WebDriverException.php:154 Stack trace: #0 C:\xampp\htdocs\xampp\testnew\vendor\facebook\webdriver\lib\Remote\HttpCommandExecutor.php(320): Facebook\WebDriver\Exception\WebDriverException::throwException(33, 'Unable to creat...', Array) #1 C:\xampp\htdocs\xampp\testnew\vendor\facebook\webdriver\lib\Remote\RemoteWebDriver.php(126): Facebook\WebDriver\Remote\HttpCommandExecutor->execute(Object(Facebook\WebDriver\Remote\WebDriverCommand)) #2 C:\xampp\htdocs\xampp\testnew\test.php(11): Facebook\WebDriver\Remote\RemoteWebDriver::create('http://localhos...', Object(Facebook\WebDriver in C:\xampp\htdocs\xampp\testnew\vendor\facebook\webdriver\lib\Exception\WebDriverException.php on line 154
在Selenium终端中,我看到以下消息:

14:18:08.607 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server.ServicedSession$Factory (provider:org.openqa.selenium.chrome.ChromeDriverService)
谁能告诉我怎么解决这个问题吗。我到处都找过了,但似乎什么也没找到


谢谢

我也有同样的问题。
您似乎应该将chrome web驱动程序可执行文件和脚本放在同一文件夹中。

我也有同样的问题,我已使用驱动程序文件设置了正确的路径变量,尝试运行selenium 3.3.1至3.12版,但没有hekp