src/ElementResolver.php
public function resolveForChecking($field, $value = null)
    {
        if (! is_null($element = $this->findById($field))) {
            return $element;
        }

        $selector = 'input[type=checkbox]';

        if (! is_null($field)) {
            $selector .= "[name='{$field}']";
        }

        if (! is_null($value)) {
            $selector .= "[value='{$value}']";
        }

        return $this->firstOrFail([
            $field, $selector,
        ]);
    }
public function resolveForChecking($field, $value = null)
    {
        if (! is_null($element = $this->findById($field))) {
            return $element;
        }

        $selector = 'input[type=checkbox]';

        if (! is_null($field)) {
            $selector .= "[name='{$field}']";
        }

        if (! is_null($value)) {
            $selector .= "[value='{$value}']";
        }

        return $this->firstOrFail([
            $field, $selector,
        ]);
    }
public function resolveForChecking ( $ field , $ value = null ) { if ( ! is_null ( $ element = $ this -> findById ( $ field ) ) ) { return $ element ; } $ selector = 'input[type=checkbox]' ; if ( ! is_null ( $ field ) ) { $ selector .= "[name='{$field}']" ; } if ( ! is_null ( $ value ) ) { $ selector .= "[value='{$value}']" ; } return $ this -> firstOrFail ( [ $ field , $ selector , ] ) ; }
Resolve the element for a given checkbox "field".

@param  string|null  $field
@param  string  $value
@return \Facebook\WebDriver\Remote\RemoteWebElement
@throws \Exception
Resolve the element for a given checkbox field .