| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A ruby gem for working with BrowserStack through its API.(V2 API only)
Add this line to your application's Gemfile:
gem 'browserstack'
And then execute:
$ bundle
Or install it yourself as:
$ gem install browserstack
First, you're probably gonna want to require it:
require 'browserstack'Creates a new client instance.
client = Browserstack::Client.new(username: "foo", password: "foobar")###API
####Getting available browsers Fetches all available browsers.
client.get_browsers #returns a hashor for a specific OS
client.get_browsers("mac")####Getting list of supported OS
client.get_supported_os_list ####Creating a worker A worker is simply a new browser instance.
enc_url = URI.escape("http://example.com/?a=\111\\115")
settings = {os: "win", browser: "ie", version: "7.0", url: enc_url}
worker_id = client.create_worker(settings)A worker id is returned after worker gets created.
####Terminating a worker Use this method to terminate an active worker. A hash with indicating how long the worker was alive is returned.
data = client.terminate_worker(worker_id)####Getting worker status Determines whether the worker is in queue, running or terminated.
worker = client.get_worker_status(worker_id)####Getting all workers of a client
workers = client.get_workersReturns an array of all workers with all their properties
| Back | FazBrowse Home | New Git URL |