def dialog_username_extractor(buttons):
    """ Extract username of a follow button from a dialog box """
    if not isinstance(buttons, list):
        buttons = [buttons]
    person_list = []
    for person in buttons:
        if person and hasattr(person, 'text') and person.text:
            try:
                person_list.append(person.find_element_by_xpath(
                    '../../../*').find_elements_by_tag_name('a')[1].text)
            except IndexError:
                pass
    return person_list
