def bdd_common_before_scenario(context_or_world, scenario): """Common scenario initialization in behave or lettuce :param context_or_world: behave context or lettuce world :param scenario: running scenario """ # Initialize and connect driver wrapper if not DriverWrappersPool.get_default_wrapper().driver: create_and_configure_wrapper(context_or_world) connect_wrapper(context_or_world) # Add assert screenshot methods with scenario configuration add_assert_screenshot_methods(context_or_world, scenario) # Configure Jira properties save_jira_conf() # Add implicitly wait implicitly_wait = context_or_world.toolium_config.get_optional( 'Driver', 'implicitly_wait') if context_or_world.driver and implicitly_wait: context_or_world.driver.implicitly_wait(implicitly_wait) context_or_world.logger.info("Running new scenario: {0}".format( scenario.name))
def bdd_common_before_scenario(context_or_world, scenario): """Common scenario initialization in behave or lettuce :param context_or_world: behave context or lettuce world :param scenario: running scenario """ # Initialize and connect driver wrapper start_driver(context_or_world) # Add assert screenshot methods with scenario configuration add_assert_screenshot_methods(context_or_world, scenario) # Configure Jira properties save_jira_conf() context_or_world.logger.info("Running new scenario: %s", scenario.name)
def bdd_common_before_scenario(context_or_world, scenario, no_driver=False): """Common scenario initialization in behave or lettuce :param context_or_world: behave context or lettuce world :param scenario: running scenario :param no_driver: True if this is an api test and driver should not be started """ # Initialize and connect driver wrapper start_driver(context_or_world, no_driver) # Add assert screenshot methods with scenario configuration add_assert_screenshot_methods(context_or_world, scenario) # Configure Jira properties save_jira_conf() context_or_world.logger.info("Running new scenario: %s", scenario.name)
def bdd_common_before_scenario(context_or_world, scenario): """Common scenario initialization in behave or lettuce :param context_or_world: behave context or lettuce world :param scenario: running scenario """ # Initialize and connect driver wrapper create_and_configure_wrapper(context_or_world) connect_wrapper(context_or_world) # Add assert screenshot methods with scenario configuration add_assert_screenshot_methods(context_or_world, scenario) # Configure Jira properties save_jira_conf() # Set implicitly wait timeout in web and mobile tests if context_or_world.driver: context_or_world.utils.set_implicitly_wait() context_or_world.logger.info("Running new scenario: %s", scenario.name)
def bdd_common_before_scenario(context_or_world, scenario): """Common scenario initialization in behave or lettuce :param context_or_world: behave context or lettuce world :param scenario: running scenario """ # Initialize and connect driver wrapper create_and_configure_wrapper(context_or_world) connect_wrapper(context_or_world) # Add assert screenshot methods with scenario configuration add_assert_screenshot_methods(context_or_world, scenario) # Configure Jira properties save_jira_conf() # Add implicitly wait implicitly_wait = context_or_world.toolium_config.get_optional('Driver', 'implicitly_wait') if context_or_world.driver and implicitly_wait: context_or_world.driver.implicitly_wait(implicitly_wait) context_or_world.logger.info("Running new scenario: {0}".format(scenario.name))