Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- from lettuce import *
- from splinter import Browser
- @before.each_feature
- def set_browser(feature):
- world.browser = Browser('firefox')
- @step(u'I go to the "(.*)"')
- def when_i_go_to_the_url(step, url):
- world.response = world.browser.visit(url)
- @step(u'I click in button with id "([^"]*)"')
- def i_click_in_button_with_value(step, button):
- world.browser.find_by_id(button).first.click()
- @step(u'I see that page contains "([^"]*)"')
- def i_see_that_page_contains_in(step, text):
- if not world.browser.is_text_present(text):
- raise Exception("%s was not found in this page ;(" % text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement