Mohawk
A gem to assist in building page-object like structures for testing Windows applications.
Installation
Runtime Environment
In order for mohawk
to work, you need to have the .NET 4.0 Framework as well as the C++ Runtime Redistributable.
Ruby Environment
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")
(: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
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request