'Clicks the navigation button, given the respective CSS classes.'

def _click_navigation_button(self, top_or_bottom_class, next_or_previous_class):

    previous_tab_id = self._active_sequence_tab.attrs('data-id')[0]
    def is_at_new_tab_id():
        '\n                                                Returns    whether    the    active    tab    has    changed.    It    is    defensive\n                                                against    the    case    where    the    page    is    still    being    loaded.\n                                                '
        active_tab = self._active_sequence_tab
        try:
            return (active_tab and (previous_tab_id != active_tab.attrs('data-id')[0]))
        except IndexError:
            return False
    self.q(css='.{}    >    .sequence-nav-button.{}'.format(top_or_bottom_class, next_or_previous_class)).first.click()
    EmptyPromise(is_at_new_tab_id, 'Button    navigation    fulfilled').fulfill()
