Skip to content

Instantly share code, notes, and snippets.

View raul-gracia's full-sized avatar
👨‍💻
Coding....

Raul Gracia raul-gracia

👨‍💻
Coding....
View GitHub Profile

PageObject + SimpleDelegator = Awesome Capybara Helpers

I've always liked using the Page Object pattern to write concise, namespaced, and composeable capybara helpers:

When /^I register as a new user$/ do
  NewUserPage.new(self).tap do |page|
    page.visit!
    page.form.fill

page.form.submit!

@raul-gracia
raul-gracia / Gemfile
Last active October 13, 2015 23:38
My Solution to the Gambit Researching Challenge
source "https://rubygems.org"
gem "capybara"
gem "selenium-webdriver"