_generated\WebGuyActions::selectOption PHP Method

selectOption() public method

Selects an option in a select tag or in radio button group. php selectOption('form select[name=account]', 'Premium'); $I->selectOption('form input[name=payment]', 'Monthly'); $I->selectOption('//form/select[@name=account]', 'Monthly'); ?> Provide an array for the second argument to select multiple options: php selectOption('Which OS do you use?', array('Windows','Linux')); ?> Or provide an associative array for the second argument to specifically define which selection method should be used: php selectOption('Which OS do you use?', array('text' => 'Windows')); // Only search by text 'Windows' $I->selectOption('Which OS do you use?', array('value' => 'windows')); // Only search by value 'windows' ?> +
See also: Codeception\Module\WebDriver::selectOption()
public selectOption ( $select, $option )
$select
$option
    public function selectOption($select, $option)
    {
        return $this->getScenario()->runStep(new \Codeception\Step\Action('selectOption', func_get_args()));
    }
WebGuyActions