linchpinagency / browserstack
There is no license information available for the latest version (0.0.3) of this package.
Client library for Browserstack Screenshot API forked from alexschwarz89/browserstack
0.0.3
2015-08-19 18:59 UTC
Requires
- php: >=5.3.3
- tzfrs/curl: 1.0
Requires (Dev)
- phpunit/phpunit: 4.4.0
This package is auto-updated.
Last update: 2025-02-02 21:57:47 UTC
README
An easy-to-use PHP library for the Browserstack Screenshots API forked from alexschwarz89/browserstack.
Working examples included.
Install
Install via composer:
{ "require": { "linchpinagency/browserstack": "0.0.3" } }
Run composer install
.
Example usage
Get an array of available browsers
use Linchpin\Browserstack\Screenshots\ScreenshotsAPI; $screenshots_api = new ScreenshotsAPI( 'username', 'password' ); $browser_list = $api->get_browsers();
Generate a screenshot
use Linchpin\Browserstack\Screenshots\ScreenshotsAPI; use Linchpin\Browserstack\Screenshots\Request; $screenshots_api = new ScreenshotsAPI( 'account', 'password' ); $request = Request::build_request( 'http://www.example.org', 'Windows', '8.1', 'ie', '11.0' ); $response = $screenshots_api->send_request( $request ); $job_ID = $response->job_ID;
Query information about the request
$status = $api->get_job_status( 'browserstack_jobID' ); if ( $status->is_finished() ) { foreach ( $status->finished_screenshots as $screenshot ) { print $screenshot->image_url ."\n"; } }