lib/AbstractWebDriverCheckboxOrRadio.php
protected function byIndex($index, $select = true)
    {
        $elements = $this->getRelatedElements();
        if (!isset($elements[$index])) {
            throw new NoSuchElementException(sprintf('Cannot locate %s with index: %d', $this->type, $index));
        }

        $select ? $this->selectOption($elements[$index]) : $this->deselectOption($elements[$index]);
    }
protected function byIndex($index, $select = true)
    {
        $elements = $this->getRelatedElements();
        if (!isset($elements[$index])) {
            throw new NoSuchElementException(sprintf('Cannot locate %s with index: %d', $this->type, $index));
        }

        $select ? $this->selectOption($elements[$index]) : $this->deselectOption($elements[$index]);
    }
protected function byIndex ( $ index , $ select = true ) { $ elements = $ this -> getRelatedElements ( ) ; if ( ! isset ( $ elements [ $ index ] ) ) { throw new NoSuchElementException ( sprintf ( 'Cannot locate %s with index: %d' , $ this -> type , $ index ) ) ; } $ select ? $ this -> selectOption ( $ elements [ $ index ] ) : $ this -> deselectOption ( $ elements [ $ index ] ) ; }
Selects or deselects a checkbox or a radio button by its index.

@param int $index
@param bool $select
@throws NoSuchElementException
Selects or deselects a checkbox or a radio button by its index .