'List all the courses found on the page\'s list of courses.'

def list_courses(self, archived=False):

    tab_selector = '#course-index-tabs    .{}    a'.format(('archived-courses-tab' if archived else 'courses-tab'))
    course_tab_link = self.q(css=tab_selector)
    if course_tab_link:
        course_tab_link.click()
    div2info = (lambda element: {'name': element.find_element_by_css_selector('.course-title').text, 'org': element.find_element_by_css_selector('.course-org    .value').text, 'number': element.find_element_by_css_selector('.course-num    .value').text, 'run': element.find_element_by_css_selector('.course-run    .value').text, 'url': element.find_element_by_css_selector('a.course-link').get_attribute('href')})
    course_list_selector = '.{}    li.course-item'.format(('archived-courses' if archived else 'courses'))
    return self.q(css=course_list_selector).map(div2info).results
