@param string $radioLabel

@throws ElementNotFoundException
@Given /^I select the "([^"]*)" radio button$/
187674
public function iSelectTheRadioButton($radioLabel)
    {
        $radioButton = $this->getSession()->getPage()->findField($radioLabel);
        if (null === $radioButton) {
            throw new ElementNotFoundException($this->getSession(), 'form field', 'id|name|label|value', $radioLabel);
        }
        $this->getSession()->getDriver()->click($radioButton->getXPath());
    }
750341
public function uncheckField($locator)
    {
        $field = $this->findField($locator);

        if (null === $field) {
            throw new ElementNotFoundException($this->getDriver(), 'form field', 'id|name|label|value', $locator);
        }

        $field->uncheck();
    }
440159
public function addRadioButton(RadioButtonInterface $radioButton): void
    {
        $radioButton->setName($this->getName());
        $radioButton->setSelected($radioButton->getValue() === $this->value);

        $this->radioButtons[] = $radioButton;
    }
661719
public function clickLink($link) {
		$link = $this->fixStepArgument($link);
		$links = $this->getSession()->getPage()->findAll('named', array(
			'link', $this->getSession()->getSelectorsHandler()->xpathLiteral($link)
		));
		if($links) foreach($links as $l) {
			if($l->isVisible()) {
				$l->click();
				return;
			}
		}
		throw new ElementNotFoundException(
			$this->getSession(), 'link', 'id|name|label|value', $link
		);
	}
323516
public function setLabel( $label )
	{
		if ( $label == $this->getLabel() ) { return; }

		$this->_values['label'] = (string) $label;
		$this->setModified();
	}
1206465
function fixLabels() {
        var labels = document.getElementsByTagName('label'),
            el,
            i = 0;

        function labelTap() {
            el = document.getElementById(this.getAttribute('for'));
            if (['radio', 'checkbox'].indexOf(el.getAttribute('type')) !== -1) {
                el.setAttribute('selected', !el.getAttribute('selected'));
            } else {
                el.focus();
            }
        }

        for (; labels[i]; i += 1) {
            if (labels[i].getAttribute('for')) {
                tiny.on(labels[i], ch.onpointertap, labelTap);
            }
        }
    }
380819
def select(str_or_rx)
      %i[value label].each do |key|
        radio = radio(key => str_or_rx)
        next unless radio.exist?

        radio.click unless radio.selected?
        return key == :value ? radio.value : radio.text
      end
      raise UnknownObjectException, "Unable to locate radio matching #{str_or_rx.inspect}"
    end
1182417
public function elementTextNotContains($selectorType, $selector, $text)
    {
        $element = $this->elementExists($selectorType, $selector);
        $actual = $element->getText();
        $regex = '/'.preg_quote($text, '/').'/ui';

        $message = sprintf(
            'The text "%s" appears in the text of the %s, but it should not.',
            $text,
            $this->getMatchingElementRepresentation($selectorType, $selector)
        );

        $this->assertElementText(!preg_match($regex, $actual), $message, $element);
    }
888549
def assert_radio_option_not_present(radio_group, radio_option)
      @web_browser.radios.each { |radio|
				the_element_name = element_name(radio)					
        if (the_element_name == radio_group) then
          perform_assertion {  assert(!(radio_option == element_value(radio) ), "unexpected radio option: " + radio_option  + " found") }
        end
      }
    end
1226127
public function assertRadioSelected($field, $value)
    {
        $element = $this->resolver->resolveForRadioSelection($field, $value);

        PHPUnit::assertTrue(
            $element->isSelected(),
            "Expected radio [{$field}] to be selected, but it wasn't."
        );

        return $this;
    }
124621
protected function add_item_label($item, $element) {
        if (strlen($item->label) && ($this->mode == self::MODE_EDIT || $this->mode == self::MODE_VIEW_TEMPLATE)) {
            $name = $element->getLabel();
            $name = '('.format_string($item->label).') '.$name;
            $element->setLabel($name);
        }
    }
795576
public function withHtml(string $name, string $label, string $containerElementCssSelector = null)
    {
        $this->contentGroup->htmlAreas[$name] = [
            'name'     => $name,
            'label'    => $label,
            'selector' => $containerElementCssSelector,
            'order'    => $this->order++,
        ];

        return $this;
    }
798714
@Override
    public void setFocus() {
        Radiobutton radio = editor.getSelected();

        if (radio == null) {
            radio = (Radiobutton) editor.getChildren().get(0);
        }

        radio.setFocus(true);
    }
710181
public function elementShouldNotHaveClass($selector, $class)
    {
        $session = $this->getSession();
        $page = $session->getPage();
        $element = $page->find('css', $selector);

        if (!$element) {
            throw new ElementNotFoundException($session, 'Element "'.$selector.'"');
        }

        \PHPUnit_Framework_TestCase::assertFalse($element->hasClass($class));
    }
1232831
private WComponent findComponentForLabel(final WComponent component) {
		// Input (but not a RadioButtonGroup)
		if (component instanceof Input && !(component instanceof RadioButtonGroup)) {
			return component;
		}

		// Fieldset or RadioButton
		if (component instanceof WFieldSet || component instanceof WRadioButton) {
			return component;
		}

		// Dont dive into repeaters or tables (Not usually used in a WField)
		if (component instanceof WRepeater || component instanceof WTable || component instanceof WDataTable) {
			return null;
		}

		if (component instanceof Container) {
			Container container = (Container) component;
			final int childCount = container.getChildCount();

			for (int i = 0; i < childCount; i++) {
				WComponent theField = findComponentForLabel(container.getChildAt(i));

				if (theField != null) {
					return theField;
				}
			}
		}

		return null;
	}
1260212
protected function createBootstrapRadioOrCheckboxOpenLabelElement($type, &$radioOrCheckboxLabel, &$return)
    {
        if( $value = $this->settings['label']['value'] )
        {
            $this->settings['label']['value'] = Base::prefix($value, $type . '-');
        }
        
        $return .= '<label'.$this->createAttribute('class', $this->settings['label']['value']).'>' . EOL;

        $radioOrCheckboxLabel = true;
    }
720448
static function radio($name, $option, $default = null, $self = false, $attrArray = null, $label_class = '')
	{
		$htmlStr = "";
	    $attrStr = self::input_attr($attrArray);

		foreach($option as $key => $value)
		{
			if($self) $key=$value;
			if ($key == $default)
			{
				$htmlStr .= "<label class='$label_class'><input type=\"radio\" name=\"$name\" id=\"{$name}_{$key}\" value=\"$key\" checked=\"checked\" {$attrStr} />".$value."</label>";
			}
			else
			{
				$htmlStr .= "<label class='$label_class'><input type=\"radio\" name=\"$name\" id=\"{$name}_{$key}\" value=\"$key\"  {$attrStr} />&nbsp;".$value."</label>";
			}
		}
		return $htmlStr;
	}