def test(data):
    actions.navigate(data.env.url + 'special-elements/')
    actions.verify_page_contains_text('Special Elements')
    golem_steps.assert_last_step_message(
        "Verify 'Special Elements' is present in the page")
    msg = "text 'THIS TEXT IS NOT PRESENT' not found in the page"
    with expected_exception(AssertionError, msg):
        actions.assert_page_contains_text('THIS TEXT IS NOT PRESENT')
def test(data):
    actions.click(page_builder.code_button)
    page_builder_code.set_value('undefined_var')
    page_builder_code.save_page()
    actions.click(page_builder_code.preview_button)
    actions.assert_page_contains_text('There are errors in the page')
    actions.assert_page_contains_text('There are errors and the page cannot be displayed, '
                                      'open the page code editor to solve them.')
    actions.assert_element_present(page_builder.open_page_code_button)
Пример #3
0
def test(data):
    test_builder.go_to_code_view()
    test_builder_code.set_value('undefined_var')
    test_builder_code.save_test()
    test_builder_code.go_to_preview_view()
    actions.assert_page_contains_text('There are errors in the test')
    actions.assert_page_contains_text(
        'There are errors and the test cannot be displayed, open the test code editor to solve them.'
    )
    actions.assert_element_present(test_builder.open_test_code_button)
def test(data):
    # switch to frame
    actions.navigate(data.env.url + 'frames/')
    # first frame in frameset is considered main content
    actions.assert_page_contains_text('Top')
    actions.switch_to_frame('frame-bottom')
    # switch to nested frame
    actions.switch_to_frame('frame-bottom-left')
    actions.assert_page_contains_text('Bottom Left')
    actions.assert_page_not_contains_text('Top')
    actions.assert_page_not_contains_text('Bottom Right')
    # switch to default content
    actions.switch_to_parent_frame()
    golem_steps.assert_last_step_message('Switch to parent frame')
    actions.switch_to_parent_frame()
    actions.assert_page_contains_text('Top')
    actions.assert_page_not_contains_text('Bottom Right')
    actions.assert_page_not_contains_text('Bottom Left')
def test_access_page_does_not_exist(data):
    actions.navigate(data.env.url + 'project/'+data.project+'/page/not_existent')
    actions.assert_page_contains_text('The page not_existent does not exist')
Пример #6
0
def test(data):
    error_msg = 'The project not_existent does not exist.'
    for url in data.urls:
        actions.navigate(data.env.url + url)
        actions.assert_page_contains_text(error_msg)
def test(data):
    actions.navigate(data.env.url + 'project/test/page/not_existent/code/')
    actions.assert_page_contains_text('The page not_existent does not exist')
Пример #8
0
def test(data):
    actions.navigate(urls.test(data.project, 'not_existent_test'))
    actions.assert_page_contains_text('The test not_existent_test does not exist')
def test(data):
    actions.navigate(data.env.url + 'project/'+data.project+'/suite/not_existent/')
    actions.assert_page_contains_text('The suite not_existent does not exist')