Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

Browserstack

Latest Stable Version Total Downloads

An easy-to-use PHP library for the Browserstack Screenshots API. Working examples included.

Install

Install via composer:

{
    "require": {
        "alexschwarz89/browserstack": "0.0.2"
    }
}

Run composer install.

Example usage

Get an array of available browsers

use Alexschwarz89\Browserstack\Screenshots\Api;
$api         = new Api('username', 'password');
$browserList = $api->getBrowsers();

Generate a screenshot

use Alexschwarz89\Browserstack\Screenshots\Api;
use Alexschwarz89\Browserstack\Screenshots\Request;
$api        = new Api('account', 'password');
$request    = Request::buildRequest('http://www.example.org', '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";
  }
}

Bitdeli Badge

About

PHP Library for accessing the Browserstack Screenshots API

Topics

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.