<commit_before># LitePage

[![Gem Version](https://badge.fury.io/rb/lite_page.svg)](http://badge.fury.io/rb/lite_page) [![Build Status](https://travis-ci.org/saclark/lite_page.svg?branch=master)](https://travis-ci.org/saclark/lite_page) [![Coverage Status](https://coveralls.io/repos/saclark/lite_page/badge.svg)](https://coveralls.io/r/saclark/lite_page)

A gem providing a quick, clean, and concise means of implementing the Page Object Model pattern and defining a semantic DSL for automated acceptance tests using watir-webdriver.

## Installation

Add this line to your application's Gemfile:

    gem 'lite_page'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install lite_page

## Usage
If you are using cucumber, include `LitePage::PageInitializers` in the cucumber World instance. This will provide `on` and `visit` methods with which to interact with your page objects.
```ruby
World(LitePage::PageInitializers)
```

Include `LightPage` in your page objects, define a `page_url` (if you want to be able to visit the page using the `visit` method), and define elements on the page.

Page elements are defined by calling a method corresponding to the appropriate element type and passing it the name by which you wish to access the element and the selectors used to locate it.
```ruby
class LoginPage
  include LitePage
  page_url('http://www.example.com/login')

  text_field(:username, :label => 'Username')
  text_field(:password, :label => 'Password')
  button(:log_in_button, :text => 'Log In')

  def log_in(username, password)
    self.username.set(username)
    self.password.set(password)
    self.log_in_button.click
  end
end
```

Visit and interact with your page objects.
```ruby
visit(LoginPage).log_in('afinch', '<PASSWORD>')
```

## Contributing

1. Fork it ( http://github.com/saclark/lite_page/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 new Pull Request
<commit_msg>update readme to point to wiki docs<commit_after># LitePage

[![Gem Version](https://badge.fury.io/rb/lite_page.svg)](http://badge.fury.io/rb/lite_page) [![Build Status](https://travis-ci.org/saclark/lite_page.svg?branch=master)](https://travis-ci.org/saclark/lite_page) [![Coverage Status](https://coveralls.io/repos/saclark/lite_page/badge.svg)](https://coveralls.io/r/saclark/lite_page)

A gem providing a quick, clean, and concise means of implementing the Page Object Model pattern and defining a semantic DSL for automated acceptance tests using watir-webdriver.

## Installation

Add this line to your application's Gemfile:

    gem 'lite_page'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install lite_page

## Usage
If you are using cucumber, include `LitePage::PageInitializers` in the cucumber World instance. This will provide `on` and `visit` methods with which to interact with your page objects.
```ruby
World(LitePage::PageInitializers)
```

Include `LightPage` in your page objects, define a `page_url` (if you want to be able to visit the page using the `visit` method), and define elements on the page.

Page elements are defined by calling a method corresponding to the appropriate element type and passing it the name by which you wish to access the element and the selectors used to locate it.
```ruby
class LoginPage
  include LitePage
  page_url('http://www.example.com/login')

  text_field(:username, :label => 'Username')
  text_field(:password, :label => 'Password')
  button(:log_in_button, :text => 'Log In')

  def log_in(username, password)
    self.username.set(username)
    self.password.set(password)
    self.log_in_button.click
  end
end
```

Visit and interact with your page objects.
```ruby
visit(LoginPage).log_in('afinch', 'mockingbird60')
```

## Documentation
Check out the wiki: https://github.com/saclark/lite_page/wiki

## Contributing

1. Fork it ( http://github.com/saclark/lite_page/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 new Pull Request

{'fraction_non_alphanumeric': 0.11427227839172349, 'fraction_numerical': 0.0028215377380672465, 'mean_word_length': 4.649402390438247, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 10, 'https://': 11, 'lorem ipsum': 0, 'www.': 2, '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': '1282336', 'n_tokens_mistral': 1366, 'n_tokens_neox': 1288, 'n_words': 456}