Skip to content

Instantly share code, notes, and snippets.

@jarib
Created October 10, 2009 13:16
Show Gist options
  • Save jarib/206839 to your computer and use it in GitHub Desktop.
Save jarib/206839 to your computer and use it in GitHub Desktop.
class SomePage
def save
save_button.click
sleep 0.1 while loading?
end
def loading?
loading_div.exists?
end
private
def loading_div
browser.div(:id, 'loading')
end
def save_button
browser.button(:id, 'save')
end
end
page = SomePage.new
page.fill_with data
page.save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment