-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Doug Morgan edited this page Dec 8, 2016
·
4 revisions
from page_object import PageObject
class ExamplePage(PageObject):
def define_elements(self):
self.page_url = 'http://pageurl'
self.button(name='example_save', identifier={'css': "[type='submit']"})
self.table(name='example_table', identifier={ 'id': 'example_id'})
def initialize_page(self):
# wait for the submit button to be present
self.button_element().when_present()
from page_object import visit, on
@when('I view the example form')
def visit_example(context):
visit(ExamplePage)
@when('I save the form')
def visit_example(context):
on(ExamplePage).example_save()