# Path: AXUI/logger/logger.py
# LOGGER = logging.getLogger(logger_config.logger_name)


from AXUI.logger import LOGGER


class _Step(object):
    '''represent one step element in the function element
    '''
    def __init__(self, xml_element, app_map):
        self.xml_element = xml_element
        self.type = xml_element.attrib["type"]
        self.command = xml_element.attrib["cmd"]
        try:
            self.app_map_name = xml_element.attrib["app_map"]
        except KeyError:
            self.app_map_name = ""
        
        if self.app_map_name:
            self.app_map = app_map.get_include_app_map_by_name(self.app_map_name)
        else:
            self.app_map = app_map
        
    def run(self):
        if self.type == "GUI":
            LOGGER.debug("run gui command: %s" , self.command)
            self.app_map.gui_execute(self.command)
        elif self.type == "CLI":

# Path: AXUI/logger/logger.py
# LOGGER = logging.getLogger(logger_config.logger_name)


# Path: AXUI/XML/func.py
from AXUI.logger import LOGGER



class _Step(object):
    '''represent one step element in the function element
    '''
    def __init__(self, xml_element, app_map):
        self.xml_element = xml_element
        self.type = xml_element.attrib["type"]
        self.command = xml_element.attrib["cmd"]
        try:
            self.app_map_name = xml_element.attrib["app_map"]
        except KeyError:
            self.app_map_name = ""
        
        if self.app_map_name:
            self.app_map = app_map.get_include_app_map_by_name(self.app_map_name)
        else:
            self.app_map = app_map
        
    def run(self):
        if self.type == "GUI":
            LOGGER.debug("run gui command: %s" , self.command)
            self.app_map.gui_execute(self.command)
        elif self.type == "CLI":

            LOGGER.debug("run cli command: %s" , self.command)