<commit_before># Webdriver::User::Agent

A helper gem to emulate populate device user agents and resolutions when using webdriver

## Installation

Add this line to your application's Gemfile:

    gem 'webdriver-user-agent'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install webdriver-user-agent

## Usage

provides a UserAgent.driver method to return a new web-driver with user agent and screen resolution mimicking a mobile device.

### Example using selenium-webdriver

require 'selenium-webdriver'
require 'webdriver-user-agent'
driver = UserAgent.driver(:browser => :chrome, :agent => :iphone, :orientation => :landscape)
driver.get 'http://tiffany.com'
driver.current_url.should == 'http://m.tiffany.com/International.aspx'

### Example using watir-webdriver

require 'watir-webdriver'
require 'webdriver-user-agent'
driver = UserAgent.driver(:browser => :chrome, :agent => :iphone, :orientation => :landscape)
browser = Watir::Browser.new driver
browser.goto 'tiffany.com'
browser.url.should == 'http://m.tiffany.com/International.aspx'

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request<commit_msg>Modified readme with formatting<commit_after># Webdriver::User::Agent

A helper gem to emulate populate device user agents and resolutions when using webdriver

## Installation

Add this line to your application's Gemfile:

    gem 'webdriver-user-agent'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install webdriver-user-agent

## Usage

provides a UserAgent.driver method to return a new web-driver with user agent and screen resolution mimicking a mobile device.

### Example using selenium-webdriver

	require 'selenium-webdriver'
	require 'webdriver-user-agent'
	driver = UserAgent.driver(:browser => :chrome, :agent => :iphone, :orientation => :landscape)
	driver.get 'http://tiffany.com'
	driver.current_url.should == 'http://m.tiffany.com/International.aspx'

### Example using watir-webdriver

	require 'watir-webdriver'
	require 'webdriver-user-agent'
	driver = UserAgent.driver(:browser => :chrome, :agent => :iphone, :orientation => :landscape)
	browser = Watir::Browser.new driver
	browser.goto 'tiffany.com'
	browser.url.should == 'http://m.tiffany.com/International.aspx'

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
{'fraction_non_alphanumeric': 0.11413651622528907, 'fraction_numerical': 0.003729951510630362, 'mean_word_length': 4.646315789473684, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3239394', 'n_tokens_mistral': 835, 'n_tokens_neox': 781, 'n_words': 270}