'Set the current preview mode to "Specific learner" with the given username or email'

def set_staff_view_mode_specific_student(self, username_or_email):

    required_mode = 'Specific    learner'
    if (self.staff_view_mode != required_mode):
        self.q(css=self.VIEW_MODE_OPTIONS_CSS).filter((lambda el: (el.text == required_mode))).first.click()
    self.browser.execute_script('$(".action-preview-username").val("{}").blur().change();'.format(username_or_email))
    self.wait_for_ajax()
