'Get or set the value in a dropdown field.'

def value_for_dropdown_field(self, field_id, value=None, focus_out=False):

    self.wait_for_field(field_id)
    self.make_field_editable(field_id)
    query = self.q(css='.u-field-{}    select'.format(field_id))
    if (not query.present):
        return None
    if (value is not None):
        select_option_by_text(query, value, focus_out)
    if (self.mode_for_field(field_id) == 'edit'):
        return get_selected_option_text(query)
    else:
        return self.get_non_editable_mode_value(field_id)
