'Return a boolean indicating whether the current tab is `tab_name`.
This is a private method, so it does NOT enforce the page check,
which is what we want when we\'re polling the DOM in a promise.'

def _is_on_tab(self, tab_name):

    current_tab_list = self.q(css='ol.course-tabs    >    li    >    a.active').text
    if (len(current_tab_list) == 0):
        self.warning('Could    not    find    current    tab')
        return False
    else:
        return (current_tab_list[0].strip().split('\n')[0] == tab_name)
