watir
===============

Watir Powered By Selenium!

[![Gem Version](https://badge.fury.io/rb/watir.svg)](http://badge.fury.io/rb/watir)
[![Build Status](https://travis-ci.org/watir/watir.svg?branch=master)](https://travis-ci.org/watir/watir)
[![Code Climate](https://codeclimate.com/github/watir/watir.svg)](https://codeclimate.com/github/watir/watir)
[![Dependency Status](https://gemnasium.com/watir/watir.svg)](https://gemnasium.com/watir/watir)
[![Coverage Status](https://coveralls.io/repos/watir/watir/badge.svg?branch=master)](https://coveralls.io/r/watir/watir)

Example
-------

```ruby
require 'watir'

browser = Watir::Browser.new
browser.goto 'google.com'
browser.text_field(title: 'Search').set 'Hello World!'
browser.button(type: 'submit').click

puts browser.title
# => 'Hello World! - Google Search'
browser.close
```

Description
-----------

The majority of element methods Watir provides with is autogenerated from specifications.
This is done by extracting the IDL parts from the spec and processing them with the WebIDL gem (link below).
Currently supported specifications are:

* [HTML](https://www.whatwg.org/specs/web-apps/current-work/) (`lib/watir/elements/html_generated.rb`)
* [SVG](http://www.w3.org/TR/SVG2/single-page.html) (`lib/watir/elements/svg_generated.rb`)

Specs
-----

Watir uses [watirspec](http://github.com/watir/watirspec) for testing. After cloning, you should fetch the submodule:

```bash
git submodule init && git submodule update
```

Specs specific to Watir are found in `spec/*_spec.rb`, with watirspec in `spec/watirspec/`.

Doctests
--------

Watir uses [yard-doctest](https://github.com/p0deje/yard-doctest) for testing documentation examples.

```bash
rake yard:doctest
```

API docs
--------

* http://rdoc.info/gems/watir/ (updated on every release)

See also
--------

* http://watir.github.io
* http://github.com/jarib/webidl
* http://github.com/watir/watirspec
* https://github.com/seleniumhq/selenium

Dependencies
------------

* selenium-webdriver

Note on Patches/Pull Requests
-----------------------------

* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
  future version unintentionally.
* Commit, do not mess with Rakefile, version, or history.
  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

Copyright
---------

Copyright (c) 2009-2015 Jari Bakken
Copyright (c) 2015-2016 Alex Rodionov, Titus Fortner
See LICENSE for details