From 24d0c2806bb3382590b5263938e4b64d30659ef6 Mon Sep 17 00:00:00 2001 From: cesar991 Date: Thu, 7 Jul 2016 11:08:53 +0200 Subject: [PATCH] Expand function create_report --- tests/console/include/common_functions_60.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/console/include/common_functions_60.py b/tests/console/include/common_functions_60.py index f2ec732d0e..3cb619b8a4 100644 --- a/tests/console/include/common_functions_60.py +++ b/tests/console/include/common_functions_60.py @@ -54,19 +54,23 @@ def logout(driver,url): #Report -def create_report(driver,nombre,group_name): +def create_report(driver,nombre,group_name,description=None): click_menu_element(driver,"Custom reporting") driver.find_element_by_id("submit-create").click() driver.find_element_by_id("text-name").clear() driver.find_element_by_id("text-name").send_keys(nombre) if group_name == "All": - Select(driver.find_element_by_id("id_group")).select_by_visible_text(group_name) + Select(driver.find_element_by_id("id_group")).select_by_visible_text(group_name) else: - #TODO This will not work when choosing a group within a group within another group - Select(driver.find_element_by_id("id_group")).select_by_visible_text(" "+group_name) + #TODO This will not work when choosing a group within a group within another group + Select(driver.find_element_by_id("id_group")).select_by_visible_text(" "+group_name) + + if description != None: + driver.find_element_by_id("textarea_description").clear() + driver.find_element_by_id("textarea_description").send_keys(description) + driver.find_element_by_id("submit-add").click() - def delete_report(driver,report_name): click_menu_element(driver,"Custom reporting") driver.find_element_by_id('text-search').clear()