LoginSignup
4
3

More than 3 years have passed since last update.

PHPでseleniumのfacebook webdriverでテスト実行した時のエラー対処法

Last updated at Posted at 2018-07-12

ブラウザテストをPHPとSeleniumでやりたくて、環境構築をしていたらfacebook webdriverでエラーが出たので、対処法を紹介します。

エラー内容

% php sample.php

Fatal error: Uncaught exception 'Facebook\WebDriver\Exception\UnknownServerException' with message 'disconnected: unable to connect to renderer
  (Session info: chrome=67.0.3396.99)
  (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.12.6 x86_64) (WARNING: The server did not provide any stacktrace information)
% php sample.php

Fatal error: Uncaught exception 'Facebook\WebDriver\Exception\UnknownServerException' with message 'unknown error: call function result missing 'value'
  (Session info: chrome=67.0.3396.99)
  (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.12.6 x86_64) (WARNING: The server did not provide any stacktrace information)

このようにエラーが出ました。

対処法

この時、ChromeDriverを2.30で使っていたのですが、最新バージョンの2.40にしたら、無事テストが実行されました。
もし上記のようなエラーが出た場合は、ChromeDriverを最新にしてみてください。

最新のChromeDriverはこちら
https://sites.google.com/a/chromium.org/chromedriver/downloads

参考

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3