Add parameter got_to_agent in search_agent function

This commit is contained in:
cesar991 2016-07-14 15:54:15 +02:00
parent 0e93fed7ff
commit 17600619e9
1 changed files with 5 additions and 2 deletions

View File

@ -19,14 +19,17 @@ def delete_agent (driver,agent_names_list):
driver.find_element_by_id("submit-go").click()
def search_agent(driver,agent_name):
def search_agent(driver,agent_name,go_to_agent=True):
click_menu_element(driver,"Agent detail")
driver.find_element_by_id("text-search").click()
driver.find_element_by_id("text-search").clear()
driver.find_element_by_id("text-search").send_keys(agent_name)
driver.find_element_by_id("submit-srcbutton").click()
driver.find_element_by_css_selector("b").click()
# If go_to_agent is true this function enters the agent view
if go_to_agent == True:
driver.find_element_by_css_selector("b").click()
def create_agent(driver,agent_name,ip=None,description=None,group=None,os_id=None):