The browser testing tool of Symfony, panther 0.8.0 is out. This version provides a lot of bug fixes and some interesting new features. Panther also moved the CI to GitHub Actions. Changes in this release include :

  • Upgrade ChromeDriver to version 85.0.4183.87
  • Upgrade geckodriver to version 0.27.0
  • Add a Client::waitForVisibility() method to wait for an element to appear
  • Allow passing options to the browser manager from PantherTestCase::createPantherClient()
  • Add a Client::ping() method to check if the WebDriver connection is still active
  • Fix setting a new value to an input field when there is an existing value
  • Improve the error message when the web server crashes
  • Throw an explanative LogicException when driver is not started yet
  • Prevent timeouts caused by the integrated web server
  • Fix the value of cookie secure flags
  • Throw an exception when getting history (unsupported feature)
  • Add docs to use Panther with GitHub Actions
  • Various bug fixes and documentation improvements

Panther is a convenient standalone library to scrape websites and to run end-to-end tests using real browsers.

Panther is super powerful. It leverages the W3C’s WebDriver protocol to drive native web browsers such as Google Chrome and Firefox.

Panther is very easy to use, because it implements Symfony’s popular BrowserKit and DomCrawler APIs, and contains all the features you need to test your apps. It will sound familiar if you have ever created a functional test for a Symfony app: as the API is exactly the same! Keep in mind that Panther can be used in every PHP project, as it is a standalone library.

Panther automatically finds your local installation of Chrome or Firefox and launches them (thanks to ChromeDriver and GeckoDriver), so you don’t need to install anything on your computer, neither Selenium server nor any other obscure driver.

In test mode, Panther automatically starts your application using the PHP built-in web-server. You can focus on writing your tests or web-scraping scenario and Panther will take care of everything else.

Unlike testing and web scraping libraries you’re used to, Panther:

  • executes the JavaScript code contained in webpages
  • supports everything that Chrome (or Firefox) implements
  • allows screenshots taking
  • can wait for asynchronously loaded elements to show up
  • lets you run your own JS code or XPath queries in the context of the loaded page
  • supports custom Selenium server installations
  • supports remote browser testing services including SauceLabs and BrowserStack

Released under MIT license. More information at https://github.com/symfony/panther

LEAVE A REPLY

Please enter your comment!
Please enter your name here