public function set_value($value) {

        if ($this->running_javascript()) {
            // Check on radio button.
            $this->field->click();

            // Trigger the onchange event as triggered when 'selecting' the radio.
            if (!empty($value) && !$this->field->isSelected()) {
                $this->trigger_on_change();
            }
        } else {
            // Goutte does not accept a check nor a click in an input[type=radio].
            $this->field->setValue($this->field->getAttribute('value'));
        }
    }
public function set_value($value) {

        if ($this->running_javascript()) {
            // Check on radio button.
            $this->field->click();

            // Trigger the onchange event as triggered when 'selecting' the radio.
            if (!empty($value) && !$this->field->isSelected()) {
                $this->trigger_on_change();
            }
        } else {
            // Goutte does not accept a check nor a click in an input[type=radio].
            $this->field->setValue($this->field->getAttribute('value'));
        }
    }
public function set_value ( $ value ) { if ( $ this -> running_javascript ( ) ) { // Check on radio button. $ this -> field -> click ( ) ; // Trigger the onchange event as triggered when 'selecting' the radio. if ( ! empty ( $ value ) && ! $ this -> field -> isSelected ( ) ) { $ this -> trigger_on_change ( ) ; } } else { // Goutte does not accept a check nor a click in an input[type=radio]. $ this -> field -> setValue ( $ this -> field -> getAttribute ( 'value' ) ) ; } }
Sets the value of a radio

Partially overwriting behat_form_checkbox
implementation as when JS is disabled we
can not check() and we should use setValue()

@param string $value
@return void
Sets the value of a radio