LoginSignup
2
1

More than 5 years have passed since last update.

phpでseleniumを使ったときのメモ

Posted at

使用したselenium : selenium-server-standalone-3.0.0-beta4.jar
library : php-webdriver (https://github.com/facebook/php-webdriver)

つまずいた点

  • curl
    php-webdriverは内部でcurlを使用しているので、phpでcurlを使えるようにしておく。
    php.iniのextension=php_curl.dllの部分のコメントを外しておく。

  • server起動時のwebdriverの指定
     server起動時にシステムプロパティでwebdriverを指定する。
     参考:(https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver#troubleshooting)
    java -Dwebdriver.chrome.driver=chromedriver.exe -jar selenium-server-standalone-3.0.0-beta4.jar
    なぜか環境変数ではうまくいかなかった。
    しかも、システムプロパティの指定は-jarの前でなければならないっぽい。
     

2
1
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
2
1