public function unselectOption($select, $option)
    {
        $el = $this->findField($select);

        $wdSelect = new WebDriverSelect($el);

        if (!is_array($option)) {
            $option = [$option];
        }

        $matched = false;

        foreach ($option as $opt) {
            try {
                $wdSelect->deselectByVisibleText($opt);
                $matched = true;
            } catch (NoSuchElementException $e) {
                // exception treated at the end
            }

            try {
                $wdSelect->deselectByValue($opt);
                $matched = true;
            } catch (NoSuchElementException $e) {
                // exception treated at the end
            }
        }

        if ($matched) {
            return;
        }
        throw new ElementNotFound(json_encode($option), "Option inside $select matched by name or value");
    }
public function unselectOption($select, $option)
    {
        $el = $this->findField($select);

        $wdSelect = new WebDriverSelect($el);

        if (!is_array($option)) {
            $option = [$option];
        }

        $matched = false;

        foreach ($option as $opt) {
            try {
                $wdSelect->deselectByVisibleText($opt);
                $matched = true;
            } catch (NoSuchElementException $e) {
                // exception treated at the end
            }

            try {
                $wdSelect->deselectByValue($opt);
                $matched = true;
            } catch (NoSuchElementException $e) {
                // exception treated at the end
            }
        }

        if ($matched) {
            return;
        }
        throw new ElementNotFound(json_encode($option), "Option inside $select matched by name or value");
    }
public function unselectOption ( $ select , $ option ) { $ el = $ this -> findField ( $ select ) ; $ wdSelect = new WebDriverSelect ( $ el ) ; if ( ! is_array ( $ option ) ) { $ option = [ $ option ] ; } $ matched = false ; foreach ( $ option as $ opt ) { try { $ wdSelect -> deselectByVisibleText ( $ opt ) ; $ matched = true ; } catch ( NoSuchElementException $ e ) { // exception treated at the end } try { $ wdSelect -> deselectByValue ( $ opt ) ; $ matched = true ; } catch ( NoSuchElementException $ e ) { // exception treated at the end } } if ( $ matched ) { return ; } throw new ElementNotFound ( json_encode ( $ option ) , "Option inside $select matched by name or value" ) ; }
Unselect an option in the given select box.

@param $select
@param $option
Unselect an option in the given select box .