def wait_for_tab_exist(self, tab_text):

        main_content = self.find_it(UI.get_theia_main_content_panel_locator())
        tab_container = self.find_it(UI.get_tab_content_locator(),
                                     parent=main_content)
        tabs = self.find_them(UI.get_tabs_locator(), parent=tab_container)

        for tab in tabs:
            if tab.text == tab_text:
                return tab

        raise WebDriverException
    def get_active_tab_element(self):
        # <li> id like "^shell-tab-code-editor-opener:.*$"
        main_content = self.find_it(UI.get_theia_main_content_panel_locator())
        tab_container = self.find_it(UI.get_tab_content_locator(),
                                     parent=main_content)
        tabs = self.find_them(UI.get_tabs_locator(), parent=tab_container)

        for tab in tabs:
            if constants.THEIA_CURRENT_TAB in tab.get_attribute(
                    constants.TYPE_CLASS):
                return tab

        return None