PHP client for Selenium/WebDriver protocol. Previously facebook/php-webdriver

Overview

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 JsonWireProtocol and also implements experimental support of W3C WebDriver. The W3C WebDriver support is not yet full-featured, however it should allow to control Firefox via Geckodriver and new versions of Chrome and Chromedriver with just a slight limitations.

The concepts of this library are very similar to the "official" Java, .NET, Python and Ruby bindings from 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:

"require": {
-    "facebook/webdriver": "(version you use)",
+    "php-webdriver/webdriver": "(version you use)",
}

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:

chromedriver --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):

geckodriver

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:

// Chromedriver (if started using --port=4444 as above)
$serverUrl = 'http://localhost:4444';
// Geckodriver
$serverUrl = 'http://localhost:4444';
// selenium-server-standalone-#.jar (version 2.x or 3.x)
$serverUrl = 'http://localhost:4444/wd/hub';
// selenium-server-standalone-#.jar (version 4.x)
$serverUrl = 'http://localhost:4444';

Now you can start browser of your choice:

use Facebook\WebDriver\Remote\RemoteWebDriver;

// Chrome
$driver = RemoteWebDriver::create($serverUrl, DesiredCapabilities::chrome());
// Firefox
$driver = RemoteWebDriver::create($serverUrl, DesiredCapabilities::firefox());
// Microsoft Edge
$driver = RemoteWebDriver::create($serverUrl, DesiredCapabilities::microsoftEdge());

3. Customize Desired Capabilities

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

They can be customized:

use Facebook\WebDriver\Firefox\FirefoxOptions;
use Facebook\WebDriver\Remote\DesiredCapabilities;

$desiredCapabilities = DesiredCapabilities::firefox();

// Disable accepting SSL certificates
$desiredCapabilities->setCapability('acceptSslCerts', false);

// Add arguments via FirefoxOptions to start headless firefox
$firefoxOptions = new FirefoxOptions();
$firefoxOptions->addArguments(['-headless']);
$desiredCapabilities->setCapability(FirefoxOptions::CAPABILITY, $firefoxOptions);

$driver = RemoteWebDriver::create($serverUrl, $desiredCapabilities);

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

// Go to URL
$driver->get('https://en.wikipedia.org/wiki/Selenium_(software)');

// Find search element by its id, write 'PHP' inside and submit
$driver->findElement(WebDriverBy::id('searchInput')) // find search input element
    ->sendKeys('PHP') // fill the search box
    ->submit(); // submit the whole form

// Find element of 'History' item in menu by its css selector
$historyButton = $driver->findElement(
    WebDriverBy::cssSelector('#ca-history a')
);
// Read text of the element and print it to output
echo 'About to click to a button with text: ' . $historyButton->getText();

// Click the element to navigate to revision history page
$historyButton->click();

// Make sure to always call quit() at the end to terminate the browser session
$driver->quit();

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.

Comments
  • W3C WebDriver protocol support

    W3C WebDriver protocol support

    This is an issue to plan and track progress of implementing W3C WebDriver protocol into php-webdriver.

    Currently, only legacy JsonWire (aka OSS) protocol is supported by php-webdriver. Selenium server 3.x translates the protocol if needed for the remote end (browser). However not everything is translated (like actions()), making some of the features not working with remote ends supporting only the W3C protocol (which is currently only GeckoDriver for Firefox 48+).

    Since Selenium 3.5 the translation to old protocol is disabled by default. It still could be reenabled by starting the server like java -jar selenium-server-standalone-3.5.3.jar -enablePassThrough false, but this is only partial and temporary solution/workaround.

    For Docker 🐳 users: use SE_OPTS environment variable to pass the enablePassThrough option to Selenium server. Ie. add -e "SE_OPTS=-enablePassThrough false" to docker run command.

    The work would require eg.:

    • add some more functional tests, to make sure we don't breake the old protocol while doing the necessary refactoring
    • prepare handshake to detect whether the remote end is speaking JsonWire or W3C dialect (we need this to support the old browsers etc.)
    • define common interface for Json and W3C protocol
    • convert current implementation to use this interface
    • implement adapter for the W3C protocol
    • implement GeckodriverService or something like that to start geckodriver locally ...

    Resources

    w3c-protocol 
    opened by OndraM 47
  • Moving forward

    Moving forward

    In order to support both Facebook internal use and acceptance in the broader community, and considering the slow current slow pace of development (last release tagged 7 months ago,) we should maintain an official community version which is allowed to grow on its own.

    This way, the community can support current practices and interoperate better with other tools. Important bug-fixes can be made to both versions, and everyone could help review and improve the code. There are many forks, and some of that can be shared back for the benefit of all.

    I've created a branch, community, which can become the default branch. How about we use that to comply with PSR-2 and add Namespaces, per #204 and #190, and make a 1.0 release?

    Any thoughts on this approach?

    opened by gfosco 20
  • Add return and param type annotations to Cookie.php to supress deprecations

    Add return and param type annotations to Cookie.php to supress deprecations

    Adding PHPDoc return and param types to ArrayAccess methods, to suppress deprecation warnings in Symfony 5.4/PHP7.4

    Pretty sure this should fix for 8.1 (don't have for test here), leaving #958 unnecessary.

    opened by tomsykes 19
  • W3C-compliant implementation, native geckodriver support

    W3C-compliant implementation, native geckodriver support

    This PR provides an implementation of the W3C flavor of the WebDriver protocol.This implem is good enough to make the Symfony Panther's test suite green when using the latest version of geckodriver. It is 100% backward compatible with the current (JsonWire) implementation.

    The (only?) missing part is the capabilities support. It's a step to close #469.

    TODO:

    • [x] Add geckodriver in Travis to run the project's test suite against a valid implementation of the W3C protocol.

    Subsequent work (in other PRs?):

    • Add new classes for exceptions that wasn't part of JsonWire
    • Add support for capabilities and other missing parts
    CLA Signed 
    opened by dunglas 19
  • sendKeys() issue : no whitespace and sending TAB instead of '6'

    sendKeys() issue : no whitespace and sending TAB instead of '6'

    What are you trying to achieve? (Expected behavior)

    I want to send a phone number in a phone number input. Phone number is a french number like 06xxxxxxxx, x being number.

    What do you get instead? (Actual behavior)

    The phone input gets the '0' and the next input gets the 'xxxxxxxx'. The '6' disapeared like it is consued like a key TAB command.

    How could the issue be reproduced? (Steps to reproduce)

    can be reproduced simply by going on google.com and sending to the input search '0600'. '0' is written and that's all.

    $driver -> get('https://google.com');
    $driver->findElement(WebDriverBy::xpath("//input[@title='Search']"))->sendKeys('0600');
    

    Details

    whitespaces are also not displayed and written.

    • Php-webdriver version: 1.8.2
    • PHP version: 7.2.24
    • Selenium server version: Using Chromedriver for chrome 83
    • Operating system: Ubuntu 18.04.6
    • Browser used + version: chromium 83
    waiting for reaction 
    opened by florian-guily 18
  • Unknown Command - ChromeDriver 80.0.3987.16

    Unknown Command - ChromeDriver 80.0.3987.16

    We just tried to upgrade to ChromeDriver 80.0.3987.16 (https://chromedriver.storage.googleapis.com/index.html?path=80.0.3987.16) and now all of our tests are failing.


    Facebook\WebDriver\Exception\UnknownCommandException: GET /session/5f064505ad5a90cf35503bd2bc4c694f/element//text Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53' System info: host: 'KDAVIS', ip: '192.168.0.104', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_192' Driver info: driver.version: unknown in C:\inetpub\Intranet_Local2\vendor\php-webdriver\webdriver\lib\Exception\WebDriverException.php on line 106

    Call Stack: 0.0623 404432 1. {main}() C:\jenkins-php-tools\vendor\phpunit\phpunit\phpunit:0 0.0781 2460496 2. PHPUnit\TextUI\Command::main(???) C:\jenkins-php-tools\vendor\phpunit\phpunit\phpunit:61 0.0781 2460608 3. PHPUnit\TextUI\Command->run(???, ???) C:\jenkins-php-tools\vendor\phpunit\phpunit\src\TextUI\Command.php:159 3.5333 13393192 4. PHPUnit\TextUI\TestRunner->doRun(???, ???, ???) C:\jenkins-php-tools\vendor\phpunit\phpunit\src\TextUI\Command.php:200 3.5452 13998888 5. PHPUnit\Framework\TestSuite->run(???) C:\jenkins-php-tools\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:621 3.5473 14003240 6. Intranet\SeleniumWorkingTest->run(???) C:\jenkins-php-tools\vendor\phpunit\phpunit\src\Framework\TestSuite.php:597 3.5474 14003240 7. PHPUnit\Framework\TestResult->run(???) C:\jenkins-php-tools\vendor\phpunit\phpunit\src\Framework\TestCase.php:756 3.5478 14015368 8. Intranet\SeleniumWorkingTest->runBare() C:\jenkins-php-tools\vendor\phpunit\phpunit\src\Framework\TestResult.php:691 4.4105 14300800 9. Intranet\SeleniumWorkingTest->runTest() C:\jenkins-php-tools\vendor\phpunit\phpunit\src\Framework\TestCase.php:1028 4.4105 14301176 10. Intranet\SeleniumWorkingTest->test_IsSeleniumWorking() C:\jenkins-php-tools\vendor\phpunit\phpunit\src\Framework\TestCase.php:1408 4.7846 14258376 11. Facebook\WebDriver\WebDriverWait->until(???, ???) C:\inetpub\Intranet_Local2\phpunit\library\Intranet\SeleniumWorkingTest.php:26 4.7846 14258376 12. call_user_func:{C:\inetpub\Intranet_Local2\vendor\php-webdriver\webdriver\lib\WebDriverWait.php:67}(???, ???) C:\inetpub\Intranet_Local2\vendor\php-webdriver\webdriver\lib\WebDriverWait.php:67 4.7846 14258376 13. Facebook\WebDriver\WebDriverExpectedCondition::Facebook\WebDriver{closure:C:\inetpub\Intranet_Local2\vendor\php-webdriver\webdriver\lib\WebDriverExpectedCondition.php:266-274}(???) C:\inetpub\Intranet_Local2\vendor\php-webdriver\webdriver\lib\WebDriverWait.php:67 4.7982 14377592 14. Facebook\WebDriver\Remote\RemoteWebElement->getText() C:\inetpub\Intranet_Local2\vendor\php-webdriver\webdriver\lib\WebDriverExpectedCondition.php:268 4.7982 14377968 15. Facebook\WebDriver\Remote\RemoteExecuteMethod->execute(???, ???) C:\inetpub\Intranet_Local2\vendor\php-webdriver\webdriver\lib\Remote\RemoteWebElement.php:273 4.7982 14377968 16. Facebook\WebDriver\Remote\RemoteWebDriver->execute(???, ???) C:\inetpub\Intranet_Local2\vendor\php-webdriver\webdriver\lib\Remote\RemoteExecuteMethod.php:40 4.7982 14378064 17. Facebook\WebDriver\Remote\HttpCommandExecutor->execute(???) C:\inetpub\Intranet_Local2\vendor\php-webdriver\webdriver\lib\Remote\RemoteWebDriver.php:565 4.8005 14421920 18. Facebook\WebDriver\Exception\WebDriverException::throwException(???, ???, ???) C:\inetpub\Intranet_Local2\vendor\php-webdriver\webdriver\lib\Remote\HttpCommandExecutor.php:331

    Chrome: Version 80.0.3987.87 (Official Build) (64-bit) php-webdriver: 1.71

    waiting for reaction 
    opened by laurinkeithdavis 18
  • ImplicitlyWait doesn't work

    ImplicitlyWait doesn't work

    I added this line before my get method $this->driver->manage()->timeouts()->implicitlyWait(30); But if element doesn't show up immediately, test fails. Tests are running in latest chrome version with 2.53.1 selenium

    bug 
    opened by grikis 17
  • Frame switching W3C Compliance

    Frame switching W3C Compliance

    Frame switching W3C Compliance

    This change updates the frame functionality to comply with the W3C specification.

    Valid values of the id parameter are:

    • null
    • a Number between 0 and 2^16
    • an Object representing a Web element

    When the value is null, set the current browsing context to the current top-level browsing context

    When the value is a valid Number, let window be the associated window of the current browsing context’s active document.

    When the value is an Object, let element be the result of trying to get a known element by web element reference id.

    Source: https://www.w3.org/TR/webdriver/#switch-to-frame

    I have also included a second commit, shared with #681 to pass isW3cCompliant to the constructor as we do in other classes.

    CLA Signed w3c-protocol 
    opened by andrewnicols 16
  • Allow Symfony4 components

    Allow Symfony4 components

    Symfony4 is in beta now and I think that it's time to allow developers test theirs projects with new set of components. But php-webdriver blocks install some of its. This PR allow.

    CLA Signed 
    opened by VolCh 16
  • Compatibility with ChromeDriver 2.31

    Compatibility with ChromeDriver 2.31

    What are you trying to achieve? (Expected behavior)

    setting chromeOptions

    What do you get instead? (Actual behavior)

    the options are ignored

    How could the issue be reproduced? (Steps to reproduce)

    With ChromeDriver 2.31, the option chromeOptions was renamed to goog:chromeOptions.

    My code snippet started working as soon as I changed value of the constant Facebook\WebDriver\Chrome\ChromeOptions::CAPABILITY to 'goog:chromeOptions'.

    Details

    • Php-webdriver version: 1.5.0
    • PHP version: 7.1.10
    • Selenium server version: 3.8.1
    • Operating system: Linux x86_64
    • Browser used + version: Chrome 65
    w3c-protocol 
    opened by freiondrej 15
  • Fix FirefoxProfile::encode() so FireFoxProfile works for Windows Users as well

    Fix FirefoxProfile::encode() so FireFoxProfile works for Windows Users as well

    Some minor changes but this seems to have solved the issue that was raised in: https://github.com/facebook/php-webdriver/issues/165#.

    There are some further possible improvements that can be made to encode() after extensive debugging of this function but I'll leave those open for another time.

    opened by onnovos 15
  • sendKeys fail silently in iframe

    sendKeys fail silently in iframe

    Bug description

    The following code fails silently for us:

    self::$webDriver->switchTo()->frame($iframe);
    $body = self::$webDriver->findElement(WebDriverBy::tagName('body'));
    sleep(2);
    $body->clear()->sendKeys($text);
    

    $iframe is not empty, if it was there would have been an error earlier. Same logic for $body. This one used to work but started to fail on github actions after we upgraded to a later Ubuntu version. I can reproduce the error locally tho.

    Updating to latest webdriver version did not fix it.

    How could the issue be reproduced

    Hard, but see our CI here: https://github.com/LimeSurvey/LimeSurvey/actions/runs/3685706349/jobs/6236995409

    You'd have to set it up locally to reproduce, or try to create a more minimal example using iframe and ckeditor perhaps.

    Expected behavior

    At least silently fail. :)

    Php-webdriver version

    1.13

    PHP version

    8.0

    How do you start the browser driver or Selenium server

    Java jar

    Selenium server / Selenium Docker image version

    selenium-server-standalone-3.7.1.jar

    Updating to selenium-server-standalone-3.141.59.jar did not fix it.

    Browser driver (chromedriver/geckodriver...) version

    geckodriver-v0.32.0-linux64.tar

    Browser name and version

    Firefox

    Operating system

    Ubuntu 20.04

    Additional context

    Let me know if you need more info. Our code is open-source, you can find the failing code here: https://github.com/LimeSurvey/LimeSurvey/blob/master/tests/functional/backend/QuestionGroupEditorTest.php#L236

    bug 
    opened by olleharstedt 3
  • Selenium 4 removing support for DesiredCapabilities

    Selenium 4 removing support for DesiredCapabilities

    Bug description

    As noted here, Selenium 4 will soon be removing support for the JsonWire prototocol. This will include removal of support for the DesiredCapabiliies which (I believe/recall) this driver currently includes for optimal compatibility with a wide range of drivers.

    How could the issue be reproduced

    It can't yet, but we should consider how to handle this now.
    

    Expected behavior

    We should probably drop support for the JsonWire protocol entirely in the long run, but perhaps we can get there by explicitly requesting a JsonWire connection for now when one is needed.

    Php-webdriver version

    main

    PHP version

    any

    How do you start the browser driver or Selenium server

    Selenium

    Selenium server / Selenium Docker image version

    Future

    Browser driver (chromedriver/geckodriver...) version

    n/a

    Browser name and version

    n/a

    Operating system

    n/a

    Additional context

    I came across this blog post from SeleniumHQ discussing their plans to drop JsonWire support entirely: https://www.selenium.dev/blog/2022/legacy-protocol-support/ In the issue discussing this removal, a developer has specifically asked if the intent is to deprecate DesiredCapabilities, and @titusfortner has confirmed that this is the intent: https://github.com/SeleniumHQ/selenium/issues/10374#issuecomment-1209667128

    bug 
    opened by andrewnicols 3
  • Window API will return Window Rect

    Window API will return Window Rect

    based on specifications Window API, window size manipulation returns window rect, which could be useful for consumers

    Ref.:

    • https://www.w3.org/TR/webdriver/#get-window-rect
    • https://www.w3.org/TR/webdriver/#set-window-rect
    • https://www.w3.org/TR/webdriver/#maximize-window
    • https://www.w3.org/TR/webdriver/#minimize-window
    • https://www.w3.org/TR/webdriver/#fullscreen-window

    Because it's an API change, it can only go into the main branch and major version release.

    To Do:

    • [x] tests
    enhancement 
    opened by oleg-andreyev 4
  • Implement Release Actions endpoint

    Implement Release Actions endpoint

    Implement missing W3C WebDriver Release Actions endpoint:

    DELETE /session/{session id}/actions

    It would best fit into WebDriverActions, however it already includes release() method, which releases mouse button (via OSS buttonup / W3C pointerUp action).

    Possible solution is:

    • [ ] rename release() method to eg. releaseMouse()
    • [ ] add release() method, marked as deprecated, which just calls releaseMouse() (so that we keep backward compatibility)
    • [ ] add new releaseActions() method (available only in W3C mode) which will actually execute the release actions endpoint.
    • [ ] in php-webdriver 2.0 remove release() method and rename releaseActions() to release().

    In case we decide we don't need to implement this in 1.x version and don't need to maintain BC, we can skip steps 2. and 3. and just implement new release() method.

    There should also be tests covering the release endpoint.

    w3c-protocol 
    opened by OndraM 2
  • php-webdriver 2.0 - RFC πŸ’¬

    php-webdriver 2.0 - RFC πŸ’¬

    This is request for comments about the next major version of php-webdriver (2.0). Once we understand what we want/need to do, we can divide the work among interested volunteers and get it rollin'! :rocket:

    Suggested objectives

    Support only W3C WebDriver

    Support only the new protocol and drop support of JsonWire protocol. This will allow us to focus our limited resources to make long-term working implementation of PHP language bindings.

    In my opinion, maintaining compatibility with the old protocol is not effective, as the situation has developed rapidly since issue #469 was originally written:

    • W3C WebDriver standard was published on 2018-06-05 - its already a year ago
    • Support of the new protocol amongst browsers is getting better with every version of the respective browsers: see https://webdriver-herald.herokuapp.com/ or https://wpt.fyi/results/webdriver
      • Chrome uses W3C protocol by default since version 75 (released 2019-06-04); even though it could be disabled, it won't work with Selenium 3.9.0 and newer (because of the missing passThrough mode)
      • Chromedriver 76 will include W3C WebDriver Actions API, one of the last missing pieces of full implementation of the standard
      • Firefox (geckodriver) support only W3C protocol from the beginning
      • IEServerDriver was, in fact, the first one with W3C protocol support
    • Selenium 3 is now in maintenance-only mode, development is now focused on Selenium 4, which will even improve W3C protocol support (and may start breaking JsonWire protocol support).
    • The last Firefox working with the JsonWire protocol is Firefox 47 released in June 2016 (over 3 years ago). Even the last Firefox Extended Support (ESR) version which supported JsonWireProtocol is over two years old (45.x) and no longer supported.
    • Most people probably run php-webdriver against Chrome/Chromium, which supports both protocols.

    So I don't see an actual need for the JsonWire protocol.

    Drop PHP 5.6 and 7.0 support

    ~Those version of PHP are no longer supported. We may also drop PHP 7.1 support, as it is in security-support mode (and only for few next months).~

    ~With PHP 7.1+ or 7.2+ we can use many of its new features, most importantly types in method parameters and return values.~

    ~If someone cannot use those new versions of PHP, he is probably working in rigid environment and maybe don't use the latest version of browsers - so one can still use the 1.x version of php-webdriver. Or has to upgrade :man_shrugging: .~

    EDIT: this was already done in php-webdriver 1.x.

    Clean object dependencies

    Historically, this library object model is based on interfaces, which often breaks LSP. It also causes headaches for static analysis. This could be taken care of in the new version.

    Other suggestions?

    Are there any other issues we should solve? Any missing features (see Java version changelog)? Or something which should be done together with BC break?

    Please comment!

    w3c-protocol 
    opened by OndraM 19
Owner
php-webdriver
PHP client for Selenium/WebDriver protocol
php-webdriver
A simple way to mock a client

Mocked Client A simple way to mock a client Install Via Composer $ composer require doppiogancio/mocked-client guzzlehttp/guzzle php-http/discovery No

Fabrizio Gargiulo 17 Oct 5, 2022
The modern, simple and intuitive PHP unit testing framework.

atoum PHP version atoum version 5.3 -> 5.6 1.x -> 3.x 7.2 -> 8.x 4.x (current) A simple, modern and intuitive unit testing framework for PHP! Just lik

atoum 1.4k Nov 29, 2022
Full-stack testing PHP framework

Codeception Modern PHP Testing for everyone Codeception is a modern full-stack testing framework for PHP. Inspired by BDD, it provides an absolutely n

Codeception Testing Framework 4.6k Jan 7, 2023
Faker is a PHP library that generates fake data for you

Faker Faker is a PHP library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in

FakerPHP 2.7k Dec 27, 2022
Mock HTTP requests on the server side in your PHP unit tests

HTTP Mock for PHP Mock HTTP requests on the server side in your PHP unit tests. HTTP Mock for PHP mocks the server side of an HTTP request to allow in

InterNations GmbH 386 Dec 27, 2022
AST based PHP Mutation Testing Framework

Infection - Mutation Testing framework Please read documentation here: infection.github.io Twitter: @infection_php Discord: https://discord.gg/ZUmyHTJ

Infection - Mutation Testing Framework for PHP 1.8k Jan 2, 2023
:heavy_check_mark: PHP Test Framework for Freedom, Truth, and Justice

Kahlan is a full-featured Unit & BDD test framework a la RSpec/JSpec which uses a describe-it syntax and moves testing in PHP one step forward. Kahlan

Kahlan 1.1k Jan 2, 2023
Event driven BDD test framework for PHP

The highly extensible, highly enjoyable, PHP testing framework. Read more at peridot-php.github.io or head over to the wiki. Building PHAR Peridot's p

Peridot 327 Jan 5, 2023
PHP Mocking Framework

Phake Phake is a framework for PHP that aims to provide mock objects, test doubles and method stubs. Phake was inspired by a lack of flexibility and e

Phake 469 Dec 2, 2022
BDD test framework for PHP

BDD test framework for PHP, inspired by Jasmine and RSpec. Features a familiar syntax, and a watch command to automatically re-run specs during develo

Daniel St. Jules 286 Nov 12, 2022
Mock built-in PHP functions (e.g. time(), exec() or rand())

PHP-Mock: mocking built-in PHP functions PHP-Mock is a testing library which mocks non deterministic built-in PHP functions like time() or rand(). Thi

null 331 Jan 3, 2023
A MySQL engine written in pure PHP

PHP MySQL Engine PHP MySQL Engine is a library for PHP that allows you to test database-driven applications with an in-memory simulation of MySQL 5.6.

Vimeo 529 Jan 4, 2023
SpecBDD Framework for PHP

phpspec The main website with documentation is at http://www.phpspec.net. Installing Dependencies Dependencies are handled via composer: wget -nc http

PHPSpec Framework 1.8k Dec 30, 2022
The PHP Unit Testing framework.

PHPUnit PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks. Installat

Sebastian Bergmann 18.8k Jan 4, 2023
Highly opinionated mocking framework for PHP 5.3+

Prophecy Prophecy is a highly opinionated yet very powerful and flexible PHP object mocking framework. Though initially it was created to fulfil phpsp

PHPSpec Framework 8.5k Jan 3, 2023
PHP unit testing framework with built in mocks and stubs. Runs in the browser, or via the command line.

Enhance PHP A unit testing framework with mocks and stubs. Built for PHP, in PHP! Quick Start: Just add EnhanceTestFramework.php and you are ready to

Enhance PHP 67 Sep 12, 2022
A PHP Module, that help with geneting of task script for playwright and send it node.js

A PHP Module, that help with geneting of task script for playwright and send it node.js

LuKa 13 Dec 7, 2022
Library that provides collection, processing, and rendering functionality for PHP code coverage information.

phpunit/php-code-coverage Provides collection, processing, and rendering functionality for PHP code coverage information. Installation You can add thi

Sebastian Bergmann 8.5k Jan 5, 2023