Panther logo

Panther

Run PHP end-to-end tests and scrape sites with real browsers

Panther lets PHP and Symfony developers drive Chrome or Firefox via WebDriver for reliable end-to-end testing and powerful web scraping, all from a simple, standalone library.

Overview

Overview

Panther is a lightweight library that lets PHP and Symfony developers control real browsers—Chrome, Chromium and Firefox—through the W3C WebDriver protocol. By running tests or scraping scripts against an actual browser, you get the same rendering, JavaScript execution, and network behavior as end users, making it ideal for functional testing and data extraction from dynamic sites.

How it works

The library ships with a simple client that starts the appropriate driver (ChromeDriver or GeckoDriver) and provides a fluent API for navigating pages, interacting with elements, and retrieving content. It can be used standalone in plain PHP scripts or integrated with Symfony’s testing framework and PHPUnit, enabling seamless inclusion in CI pipelines. Headless mode is supported out‑of‑the‑box for faster, resource‑efficient runs, while full‑browser mode remains available for visual debugging.

Highlights

Real‑browser automation via the WebDriver protocol
Supports Chrome, Chromium, and Firefox out of the box
Seamless integration with Symfony and plain PHP projects
Simple, fluent API for both testing and scraping

Pros

  • High fidelity testing with actual browsers
  • Single‑dependency, MIT‑licensed library
  • Active community and extensive documentation
  • Headless mode for CI/CD efficiency

Considerations

  • Requires Chrome/Firefox binaries and drivers on the host
  • Limited to the PHP ecosystem
  • Potentially slower than pure HTTP clients for static pages
  • No built‑in visual test reporting

Managed products teams compare with

When teams consider Panther, these hosted platforms usually appear on the same shortlist.

BrowserStack Automate logo

BrowserStack Automate

Cross-browser test automation on 3500+ real browser/OS combinations

GHO

Ghost Inspector

Automated browser tests for websites and web apps

LambdaTest logo

LambdaTest

Cross-browser & mobile app testing cloud with real devices and automation

Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.

Fit guide

Great for

  • PHP developers needing reliable end‑to‑end UI tests
  • Teams scraping JavaScript‑heavy websites
  • Symfony projects that want integrated browser testing
  • QA engineers preferring code‑driven browser control

Not ideal when

  • Environments where installing Chrome or Firefox is impossible
  • Low‑resource or embedded systems
  • Non‑PHP technology stacks
  • Simple static‑page checks that don't require a real browser

How teams use it

Automated UI regression testing

Detect visual and functional regressions across Chrome and Firefox during each build.

Data extraction from single‑page applications

Scrape structured data from sites that render content dynamically with JavaScript.

Continuous integration pipelines

Run headless browser tests automatically in CI/CD workflows for fast feedback.

Cross‑browser compatibility verification

Ensure core features work consistently in both Chrome and Firefox browsers.

Tech snapshot

PHP100%

Tags

symfonychromedriverwebdriverhacktoberfestphpe2e-testingselenium-webdriverseleniumscraping

Frequently asked questions

Does Panther require a Selenium server?

No. Panther communicates directly with ChromeDriver or GeckoDriver via the WebDriver protocol.

Can I run tests in headless mode?

Yes. Configure the driver to use headless mode for faster, resource‑efficient execution.

Is Panther compatible with Symfony's testing framework?

Yes. It provides a client that integrates with Symfony's BrowserKit and PHPUnit.

Which browsers are supported?

Chrome, Chromium, and Firefox (through GeckoDriver) are supported out of the box.

What license does Panther use?

Panther is released under the MIT license.

Project at a glance

Active
Stars
3,058
Watchers
3,058
Forks
235
LicenseMIT
Repo age7 years old
Last commit2 weeks ago
Primary languagePHP

Last synced yesterday