Download the PHP package php-webdriver/webdriver without Composer

On this page you can find all versions of the php package php-webdriver/webdriver. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package webdriver

php-webdriver – Selenium WebDriver bindings for PHP

Latest stable version GitHub Actions build status SauceLabs test status Total downloads

Description

Php-webdriver library is PHP language binding for Selenium WebDriver, which allows you to control web browsers from PHP.

This library is compatible with Selenium server version 2.x, 3.x and 4.x.

The library supports modern W3C WebDriver protocol, as well as legacy JsonWireProtocol.

The concepts of this library are very similar to the "official" Java, JavaScript, .NET, Python and Ruby libraries which are developed as part of the Selenium project.

Installation

Installation is possible using Composer.

If you don't already use Composer, you can download the composer.phar binary:

curl -sS https://getcomposer.org/installer | php

Then install the library:

php composer.phar require php-webdriver/webdriver

Upgrade from version <1.8.0

Starting from version 1.8.0, the project has been renamed from facebook/php-webdriver to php-webdriver/webdriver.

In order to receive the new version and future updates, you need to rename it in your composer.json:

and run composer update.

Getting started

1. Start server (aka. remote end)

To control a browser, you need to start a remote end (server), which will listen to the commands sent from this library and will execute them in the respective browser.

This could be Selenium standalone server, but for local development, you can send them directly to so-called "browser driver" like Chromedriver or Geckodriver.

a) Chromedriver

📙 Below you will find a simple example. Make sure to read our wiki for more information on Chrome/Chromedriver.

Install the latest Chrome and Chromedriver. Make sure to have a compatible version of Chromedriver and Chrome!

Run chromedriver binary, you can pass port argument, so that it listens on port 4444:

b) Geckodriver

📙 Below you will find a simple example. Make sure to read our wiki for more information on Firefox/Geckodriver.

Install the latest Firefox and Geckodriver. Make sure to have a compatible version of Geckodriver and Firefox!

Run geckodriver binary (it start to listen on port 4444 by default):

c) Selenium standalone server

Selenium server can be useful when you need to execute multiple tests at once, when you run tests in several different browsers (like on your CI server), or when you need to distribute tests amongst several machines in grid mode (where one Selenium server acts as a hub, and others connect to it as nodes).

Selenium server then act like a proxy and takes care of distributing commands to the respective nodes.

The latest version can be found on the Selenium download page.

📙 You can find further Selenium server information in our wiki.

d) Docker

Selenium server could also be started inside Docker container - see docker-selenium project.

2. Create a Browser Session

When creating a browser session, be sure to pass the url of your running server.

For example:

Now you can start browser of your choice:

3. Customize Desired Capabilities

Desired capabilities define properties of the browser you are about to start.

They can be customized:

Capabilities can also be used to 📙 configure a proxy server which the browser should use.

To configure browser-specific capabilities, you may use 📙 ChromeOptions or 📙 FirefoxOptions.

4. Control your browser

See example.php for full example scenario. Visit our GitHub wiki for 📙 php-webdriver command reference and further examples.

NOTE: Above snippets are not intended to be a working example by simply copy-pasting. See example.php for a working example.

Changelog

For latest changes see CHANGELOG.md file.

More information

Some basic usage example is provided in example.php file.

How-tos are provided right here in 📙 our GitHub wiki.

If you don't use IDE, you may use API documentation of php-webdriver.

You may also want to check out the Selenium project docs and wiki.

Testing framework integration

To take advantage of automatized testing you may want to integrate php-webdriver to your testing framework. There are some projects already providing this:

Support

We have a great community willing to help you!

❓ Do you have a question, idea or some general feedback? Visit our Discussions page. (Alternatively, you can look for many answered questions also on StackOverflow).

🐛 Something isn't working, and you want to report a bug? Submit it here as a new issue.

📙 Looking for a how-to or reference documentation? See our wiki.

Contributing ❤️

We love to have your help to make php-webdriver better. See CONTRIBUTING.md for more information about contributing and developing php-webdriver.

Php-webdriver is community project - if you want to join the effort with maintaining and developing this library, the best is to look on issues marked with "help wanted" label. Let us know in the issue comments if you want to contribute and if you want any guidance, and we will be delighted to help you to prepare your pull request.


All versions of webdriver with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.0
ext-curl Version *
ext-json Version *
ext-zip Version *
symfony/polyfill-mbstring Version ^1.12
symfony/process Version ^5.0 || ^6.0 || ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package php-webdriver/webdriver contains the following files

Loading the files please wait ....