'Click the tab to display the available libraries, and return detail of them.'

def list_libraries(self):

    self.q(css='#course-index-tabs    .libraries-tab    a').click()
    if self.q(css='.list-notices.libraries-tab').present:
        self.wait_for_element_visibility('.libraries-tab    .new-library-button', 'Switch    to    library    tab')
        return []
    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, 'link_element': element.find_element_by_css_selector('a.library-link'), 'url': element.find_element_by_css_selector('a.library-link').get_attribute('href')})
    self.wait_for_element_visibility('.libraries    li.course-item', 'Switch    to    library    tab')
    return self.q(css='.libraries    li.course-item').map(div2info).results
