Retrieves the select options in the element. If the element isn't present
or a select, a null value will be returned.

@return String[]: the options from the select element
192682
@SuppressWarnings("squid:S1168")
    public String[] selectOptions() {
        if (isNotPresentSelect()) {
            return null;    // returning an empty array could be confused with no options available
        }
        WebElement webElement = element.getWebElement();
        Select dropdown = new Select(webElement);
        List<WebElement> options = dropdown.getOptions();
        String[] stringOptions = new String[options.size()];
        for (int i = 0; i < options.size(); i++) {
            stringOptions[i] = options.get(i).getText();
        }
        return stringOptions;
    }
304268
public function _getOptions()
    {
        $opts = array();
        if (!empty($this->where))
        {
            $opts['where'] = $this->where;
        }
        if (count($this->includes))
        {
            $opts['include'] = join(',', $this->includes);
        }
        if (count($this->selectedKeys))
        {
            $opts['keys'] = join(',', $this->selectedKeys);
        }
        if ($this->limit >= 0)
        {
            $opts['limit'] = $this->limit;
        }
        if ($this->skip > 0)
        {
            $opts['skip'] = $this->skip;
        }
        if ($this->orderBy)
        {
            $opts['order'] = join(',', $this->orderBy);
        }
        if ($this->count)
        {
            $opts['count'] = $this->count;
        }

        return $opts;
    }
14638
public function getOptionsAsArray()
    {
        $options      = $this->getOptions();
        $optionsArray = [];
        foreach ($options as $option) {
            $optionsArray[$option->getValue()] = $option->getNodeValue();
        }
        return $optionsArray;
    }
1127299
public function selectOptions()
    {
        if ($this->selectOptions === null) {
            $this->selectOptions = $this->defaultSelectOptions();
        }

        return $this->selectOptions;
    }
1372961
public static function toSelectArray(): array
    {
        $array = static::toArray();
        $selectArray = [];

        foreach ($array as $key => $value) {
            $selectArray[$value] = static::getDescription($value);
        }

        return $selectArray;
    }
465710
public function pickerOptions()
    {
        if ($this->pickerOptions === null) {
            $this->pickerOptions = $this->defaultPickerOptions();
        }

        return $this->pickerOptions;
    }
1106532
public function getElements()
    {
        foreach ($this->elements as $name => $element) {
            $this->resolveXRef($name);
        }

        return $this->elements;
    }
301661
public function dualSelectOptions()
    {
        if ($this->dualSelectOptions === null) {
            $this->dualSelectOptions = $this->defaultDualSelectOptions();
        }

        return $this->dualSelectOptions;
    }
828910
public function toOptionArray()
    {
        return array(
            array('value' => self::SELECT, 'label' => Mage::helper('adminhtml')->__('Select')),
            array('value' => self::TEXT, 'label' => Mage::helper('adminhtml')->__('Text')),
        );
    }
904478
@Override
    public List<String> getOptions() throws WidgetException {
        try {
            Select select = new Select(getByLocator());
            return select.getOptions();
        } catch (Exception e) {
            throw new WidgetException("Error while fetching drop down options", getByLocator(), e);
        }
    }
543843
@Override
    public List<String> getOptions() throws WidgetException {
        try {
            org.openqa.selenium.support.ui.Select selectBox = new org.openqa.selenium.support.ui.Select(
                    findElement());
            List<WebElement> options = selectBox.getOptions();

            List<String> optionsTextValues = new ArrayList<String>();
            for (WebElement e : options) {
                optionsTextValues.add(e.getText());
            }

            return optionsTextValues;
        } catch (Exception e) {
            throw new WidgetException("Error while fetching select options", getByLocator(), e);
        }
    }
797974
public function getValues() : array
    {
        $values = [];

        foreach ($this->getOptions() as $option) {
            if ($option->isSelected()) {
                $values[] = $option->getValue();
            }
        }

        return $values;
    }
1105842
public function getOptions()
    {
        $options = [];
        foreach ($this->childNodes as $child) {
            if ($child instanceof Option) {
                $options[] = $child;
            }
        }
        return $options;
    }
161366
protected function getOptions()
	{
		// Initialize some field attributes.
		$client = (string) $this->element['client'];
		if ($client != 'site' && $client != 'administrator')
		{
			$client = 'site';
		}

		$client_id = 0;

		if ($client == 'administrator')
		{
			$client_id = 1;
		}

		$path = PATH_APP . DS . 'bootstrap' . DS . $client;
		if (!is_dir($path))
		{
			$path = PATH_CORE . DS . 'bootstrap' . DS . $client;
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(
			parent::getOptions(),
			App::get('language')->getList($this->value, $path, true, true, $client_id)
		);

		return $options;
	}
537959
public function getValue()
    {
        $value = [];
        foreach ($this->getElements() as $el) {
            if ($el->getKey() !== null) {
                $value[$el->getKey()] = $el->getValue();
            } else {
                $value[] = $el->getValue();
            }
        }

        return $value;
    }
960874
protected function getOptions()
    {
        $baseOptions = [
            ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],
        ];

        return array_merge($baseOptions, isset($this->options) ? $this->options : []);
    }
654914
public function getAllOptions()
    {
        $result = [];

        foreach ($this->getOptionArray() as $index => $value) {
            $result[] = ['value' => $index, 'label' => $value];
        }

        return $result;
    }