public function selectMultipleOptionsInChosen($label, $options)
	{
		$select = $this->findField($label);
		$selectID = $select->getAttribute('id');
		$chosenSelectID = $selectID . '_chzn';

		foreach ($options as $option)
		{
			$this->debug("I open the $label chosen selector");
			$this->click(array('xpath' => "//div[@id='$chosenSelectID']/ul"));
			$this->debug("I select $option");
			$this->click(array('xpath' => "//div[@id='$chosenSelectID']//li[contains(text()[normalize-space()], '$option')]"));

			// Gives time to chosen to close
			$this->wait(1);
		}
	}
public function selectMultipleOptionsInChosen($label, $options)
	{
		$select = $this->findField($label);
		$selectID = $select->getAttribute('id');
		$chosenSelectID = $selectID . '_chzn';

		foreach ($options as $option)
		{
			$this->debug("I open the $label chosen selector");
			$this->click(array('xpath' => "//div[@id='$chosenSelectID']/ul"));
			$this->debug("I select $option");
			$this->click(array('xpath' => "//div[@id='$chosenSelectID']//li[contains(text()[normalize-space()], '$option')]"));

			// Gives time to chosen to close
			$this->wait(1);
		}
	}
public function selectMultipleOptionsInChosen ( $ label , $ options ) { $ select = $ this -> findField ( $ label ) ; $ selectID = $ select -> getAttribute ( 'id' ) ; $ chosenSelectID = $ selectID . '_chzn' ; foreach ( $ options as $ option ) { $ this -> debug ( "I open the $label chosen selector" ) ; $ this -> click ( array ( 'xpath' => "//div[@id='$chosenSelectID']/ul" ) ) ; $ this -> debug ( "I select $option" ) ; $ this -> click ( array ( 'xpath' => "//div[@id='$chosenSelectID']//li[contains(text()[normalize-space()], '$option')]" ) ) ; // Gives time to chosen to close $ this -> wait ( 1 ) ; } }
Selects one or more options in a Chosen Multiple Select based on its label

@param   string  $label    Label of the select field
@param   array   $options  Array of options to be selected

@return  void

@since   3.0.0
Selects one or more options in a Chosen Multiple Select based on its label