def test(data): actions.navigate(data.env.url + 'alert/') with expected_exception(AssertionError, 'an alert was not present'): actions.assert_alert_present() actions.click('#alert-button') actions.assert_alert_present() assert golem_steps.get_last_step_message() == 'Assert an alert is present' actions.dismiss_alert()
def test(data): actions.send_keys(suite_builder.environments_input, 'not-existent') actions.wait(0.5) actions.click(suite_builder.save_button) common.assert_toast_message_is_displayed( 'Environment not-existent does not exist for project test') actions.refresh_page() actions.assert_alert_present() actions.accept_alert() actions.assert_element_value(suite_builder.environments_input, '')
def test(data): actions.wait(1) actions.check_element(suite_builder.all_tests_checkbox) actions.send_keys(suite_builder.processes_input, 3) actions.refresh_page() actions.wait(1) actions.assert_alert_present() actions.accept_alert() actions.assert_element_value(suite_builder.processes_input, '1') actions.clear_element(suite_builder.processes_input) actions.send_keys(suite_builder.processes_input, 3) actions.refresh_page() actions.assert_alert_present() actions.dismiss_alert() suite_builder.save_suite() common.navigate_menu('Suites') actions.assert_title_contains(': Suites')
def test(data): test_builder.add_step_to_test('test', 'click') actions.refresh_page() actions.assert_alert_present() actions.dismiss_alert() assert test_builder.get_step('test', 0).action_name == 'click'
def test(data): test_builder.add_action('click') actions.refresh_page() actions.assert_alert_present() actions.accept_alert()
def test(data): test_builder.add_action('click') actions.refresh_page() actions.assert_alert_present() actions.dismiss_alert() test_builder.assert_last_action('click')
def test(data): test_builder.add_step_to_test('test', 'click') actions.refresh_page() actions.assert_alert_present() actions.accept_alert()