public static function get_form_field_from_label($label, RawMinkContext $context) {

        // There are moodle form elements that are not directly related with
        // a basic HTML form field, we should also take care of them.
        // The DOM node.
        $fieldnode = $context->find_field($label);

        // The behat field manager.
        return self::get_form_field($fieldnode, $context->getSession());
    }