def save_recipe(self, conf):
"""Save recipe with a unique UUID."""
"""Return a recipe page, recipe name, and notification's texts."""
recipe_additional_filters = conf.get('recipe',
'recipe_additional_filters')
recipe_action = conf.get('recipe', 'recipe_action')
recipe_name = str(uuid.uuid1().hex)
name_field = self.wait.until(EC.element_to_be_clickable(
self.LOCATORS.name))
name_field.clear()
name_field.send_keys(recipe_name)
self.find_element(*self.LOCATORS.filter_textbox).send_keys(
recipe_additional_filters)
self.action_configuration(conf, recipe_action)
save_new_recipe_button = self.wait.until(EC.element_to_be_clickable(
self.LOCATORS.save))
save_new_recipe_button.click()
messages_list = self.message_alert_helper()
recipe_page = Recipe(self.selenium, self.base_url)
return recipe_page.wait_for_request_button(), recipe_name, messages_list # noqa
评论列表
文章目录