def get_lhn_accordion(driver, object_name): """Select relevant section in LHN and return relevant section accordion.""" selenium_utils.open_url(driver, dashboard.Dashboard.URL) lhn_menu = dashboard.Header(driver).open_lhn_menu() # if object button not visible, open this section first if object_name in cache.LHN_SECTION_MEMBERS: method_name = factory.get_method_lhn_select(object_name) lhn_menu = getattr(lhn_menu, method_name)() return getattr(lhn_menu, constants.method.SELECT_PREFIX + object_name)()
def get_lhn_accordion(driver, object_name): """Select relevant section in LHN and return relevant section accordion. """ navigate_to_page_with_lhn(driver) lhn_contents = dashboard.Header(driver).open_lhn_menu() # if object button not visible, open this section first if object_name in cache.LHN_SECTION_MEMBERS: method_name = factory.get_method_lhn_select(object_name) lhn_contents = getattr(lhn_contents, method_name)() return getattr(lhn_contents, constants.method.SELECT_PREFIX + object_name)()
def get_lhn_accordion(driver, object_name): """Selects the relevant section in LHN and return the relevant section accordion. """ navigate_to_page_with_lhn(driver) lhn_contents = dashboard.Header(driver).open_lhn_menu() # if the object button is not visible, we have to open it's section first if object_name in cache.LHN_SECTION_MEMBERS: method_name = factory.get_method_lhn_select(object_name) lhn_contents = getattr(lhn_contents, method_name)() return getattr(lhn_contents, constants.method.SELECT_PREFIX + object_name)()