1. Go to this page and download the library: Download bhittani/web-browser library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bhittani / web-browser example snippets
use Bhittani\WebBrowser\Chrome;
$browser = new Chrome;
use Bhittani\WebBrowser\Phantomjs;
$browser = new Phantomjs;
use Bhittani\WebBrowser\Browser;
use Bhittani\WebBrowser\Phantomjs;
use Bhittani\WebBrowser\Testing;
Testing::bootstrap(); // Required for purging failed assertions.
Browser::test(function ($browser1, $browser2/*, ... */) {
$browser1->visit('https://example.com')->assertSee('Example');
$browser2->visit('https://example.net')->assertSee('Example');
});
Phantomjs::test(/*...*/);
Testing::tearDown(); // Required for closing all browsers.
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.