From cba1f7c0cd03533cd21e1a44689057aedf771d44 Mon Sep 17 00:00:00 2001
From: cesar991 <cesar.espinosa@artica.es>
Date: Wed, 6 Jul 2016 11:16:42 +0200
Subject: [PATCH] Add create_new_dashboard function

---
 tests/console/include/common_functions_60.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/console/include/common_functions_60.py b/tests/console/include/common_functions_60.py
index ba994d64ad..6a9fd5e9a3 100644
--- a/tests/console/include/common_functions_60.py
+++ b/tests/console/include/common_functions_60.py
@@ -204,3 +204,17 @@ def create_agent(driver,agent_name,ip=None,description=None,group=None,os_id=Non
 		Select(driver.find_element_by_id("id_os")).select_by_visible_text(os_id)
 	
 	driver.find_element_by_id("submit-crtbutton").click()
+
+
+#Dashboard
+
+def create_new_dashboard(driver,name,group):
+	click_menu_element(driver,"Main dashboard")
+	driver.find_element_by_xpath('//*[@id="menu_tab"]/ul/li[4]/a/img').click()
+	driver.find_element_by_xpath('//*[@id="table2-0-1"]/a[2]/img').click()
+	driver.find_element_by_id("text-name").send_keys(name)
+	Select(driver.find_element_by_id("group")).select_by_visible_text(group)
+	driver.find_element_by_id('submit-add-btn').click()
+
+
+