Skip to content

wizardofelves/mohawk

 
 

Repository files navigation

Mohawk

Build Status

A gem to assist in building page-object like structures for testing Windows applications.

Installation

Add this line to your application's Gemfile:

gem 'mohawk'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mohawk

Example

Defining a screen

require 'mohawk'

class LoginScreen
  include Mohawk
  window(:title => /Login/)

  text(:username, :id => "UserNameField")
  text(:password, :id => "PasswordField")
  
  button(:login, :value => "Login")
end

Using the Page-Object

World(Mohawk::Navigation)

on(LoginScreen) do |screen|
  screen.username = "levi"
  screen.password = "secret"
  screen.login
end

Contributing

  1. Fork it
  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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published