php-webdriver lets PHP applications control browsers through Selenium WebDriver, supporting modern W3C WebDriver and legacy JsonWireProtocol against Selenium 2.x through 4.x servers or local Chromedriver and Geckodriver.
Overview
The library mirrors concepts from official Selenium language bindings so PHP tests and automation scripts create remote WebDriver sessions, set capabilities, and issue browser commands the same way as Java or Python clients.
You start a remote end such as Chromedriver, Geckodriver, Selenium standalone, or a Dockerized Selenium grid, then point the PHP client at that URL when constructing a session. Desired capabilities configure browser-specific ChromeOptions or FirefoxOptions, proxies, and other startup parameters.
Installation is via Composer under the php-webdriver/webdriver package name after the project rename from facebook/php-webdriver. Documentation and wiki pages cover command reference and integration with PHP test frameworks that wrap WebDriver workflows.
Community support channels include GitHub discussions and documented contribution guidelines for extending coverage.
Key features
- W3C WebDriver and JsonWire support
- Chromedriver and Geckodriver sessions
- Desired capabilities configuration
- ChromeOptions and FirefoxOptions helpers
- Composer-based installation
- Selenium grid compatibility
- Wiki command reference
Use cases
- Automate browser tests from PHPUnit suites
- Script Chromium or Firefox interactions in PHP
- Run UI checks against Selenium Docker grids
- Integrate WebDriver into CI pipelines