def _check_webi_login_root(): if world.config.browser_enable and world.config.xivo_configured: try: element = world.browser.find_element_by_xpath('//h1[@id="loginbox"]/span[contains(.,"Login")]/b') username = element.text except NoSuchElementException: common.webi_login_as_default() else: if username != "root": common.webi_logout() common.webi_login_as_default()
def _check_webi_login_root(): if world.config.browser_enable and world.config.xivo_configured: try: element = world.browser.find_element_by_xpath( '//h1[@id="loginbox"]/span[contains(.,"Login")]/b') username = element.text except NoSuchElementException: common.webi_login_as_default() else: if username != "root": common.webi_logout() common.webi_login_as_default()
def when_i_logout_from_the_web_interface(step): common.webi_logout()