def view_blog(webdriver, datasets): blog = Page(webdriver, page_id=datasets['blog_id']) @print_timing def measure(webdriver, interaction): blog.go_to() blog.wait_for_page_loaded(interaction) measure(webdriver, "selenium_view_blog")
def view_page(webdriver, datasets): page = Page(webdriver, page_id=datasets['page_id']) @print_timing def measure(webdriver, interaction): page.go_to() page.wait_for_page_loaded(interaction) measure(webdriver, "selenium_view_page")
def create_comment(webdriver, datasets): page = Page(webdriver, page_id=datasets['page_id']) page.go_to() page.wait_for_page_loaded(interaction='create comment') edit_comment = Editor(webdriver) @print_timing def measure(webdriver, interaction): page.click_add_comment() edit_comment.write_content(interaction=interaction, text='This is selenium comment') measure(webdriver, 'selenium_create_comment:write_comment') @print_timing def measure(webdriver, interaction): edit_comment.click_submit() page.wait_for_comment_field(interaction) measure(webdriver, "selenium_create_comment:save_comment")
def create_comment(webdriver, datasets): page = Page(webdriver, page_id=datasets['page_id']) @print_timing("selenium_create_comment") def measure(): page.go_to() page.wait_for_page_loaded() edit_comment = Editor(webdriver) @print_timing("selenium_create_comment:write_comment") def sub_measure(): page.click_add_comment() edit_comment.write_content(text='This is selenium comment') sub_measure() @print_timing("selenium_create_comment:save_comment") def sub_measure(): edit_comment.click_submit() page.wait_for_comment_field() sub_measure() measure()
def sub_measure(): create_page.click_submit() page = Page(webdriver) page.wait_for_page_loaded()
def measure(webdriver, interaction): create_page.click_submit() page = Page(webdriver) page.wait_for_page_loaded(interaction)