Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jdenen/watir-device
Automate Chrome Developer Tools' device emulation with watir-webdriver
https://github.com/jdenen/watir-device
device-emulation ruby testing watir watir-webdriver
Last synced: 19 days ago
JSON representation
Automate Chrome Developer Tools' device emulation with watir-webdriver
- Host: GitHub
- URL: https://github.com/jdenen/watir-device
- Owner: jdenen
- License: mit
- Created: 2015-09-01T01:58:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-03T20:07:48.000Z (over 9 years ago)
- Last Synced: 2024-10-29T08:24:35.616Z (2 months ago)
- Topics: device-emulation, ruby, testing, watir, watir-webdriver
- Language: Ruby
- Homepage:
- Size: 676 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Watir::Device
[![Gem Version](https://badge.fury.io/rb/watir-device.svg)](http://badge.fury.io/rb/watir-device)
[![Build Status](https://travis-ci.org/jdenen/watir-device.svg?branch=master)](https://travis-ci.org/jdenen/watir-device)Automate Chrome Developer Tools' device emulation with watir-webdriver.
![screenshot](screenshot.png)
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'watir-device'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install watir-device
## Usage
Instantiate an emulated device much like you would a `Watir::Browser` object. Just pass it a valid device string:
```ruby
require 'watir-device'
device = Watir::Device.new "Samsung Galaxy Note 3"
device.goto "www.google.com"
``````ruby
require 'watir-device'
device = Watir::Device.start "www.google.com", "Samsung Galaxy Note 3"
```#### Methods
All methods you normally use with `Watir::Browser` are available to your `Watir::Device` object. The `Watir::Browser` object itself is available via `Watir::Device#browser`, though you shouldn't need to access it.
```ruby
device = Watir::Device.new "Samsung Galaxy Note 3"
device.browser
#=>
```## Contributing
1. Fork it ( https://github.com/[my-github-username]/watir-device/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request