wkse / browserstack
There is no license information available for the latest version (0.0.7) of this package.
Client library for Browserstack Screenshot API
This package's canonical repository appears to be gone and the package has been frozen as a result.
0.0.7
2016-09-16 21:23 UTC
Requires
- php: >=5.3.3
- tzfrs/curl: 1.2
Requires (Dev)
- phpunit/phpunit: ^5.5
This package is not auto-updated.
Last update: 2019-03-12 13:06:44 UTC
README
Based om Browserstack by alexschwarz89
An easy-to-use PHP library for the Browserstack Screenshots API. Working examples included.
Install
Install via composer:
{
"require": {
"wkse\browserstack": "0.0.3"
}
}
Run composer install
.
Example usage
Get an array of available browsers
use wkse\browserstack\Screenshots\Api;
$api = new Api('username', 'password');
$browserList = $api->getBrowsers();
Generate a screenshot
use wkse\browserstack\Screenshots\Api;
use wkse\browserstack\Screenshots\Request;
$api = new Api('account', 'password');
$request = Request::buildRequest('http://www.google.com', 'Windows', '8.1', 'ie', '11.0');
$response = $api->sendRequest( $request );
$jobId = $response->jobId;
Query information about the request
$status = $api->getJobStatus('browserstack_jobid');
if ($status->isFinished()) {
foreach ($status->finishedScreenshots as $screenshot) {
print $screenshot->image_url ."\n";
}
}