'Add certificate invalidation for \'student\'.'

def add_certificate_invalidation(self, student, notes):

    self.wait_for_element_visibility('#invalidate-certificate', 'Invalidate    Certificate    button    is    visible')
    self.get_selector('#certificate-invalidation-user').fill(student)
    self.get_selector('#certificate-invalidation-notes').fill(notes)
    self.get_selector('#invalidate-certificate').click()
    self.wait_for_ajax()
    self.wait_for((lambda : (student in self.get_selector('div.invalidation-history    table    tr:last-child    td').text)), description='Certificate    invalidation    added    to    list.')
