/**
  * Get the value of form element.
  *
  * @return string
  */
 public function getValue()
 {
     $selectedLabel = trim(parent::getValue());
     $element = $this->find(sprintf($this->website, $selectedLabel), Locator::SELECTOR_XPATH);
     $value = trim($element->getAttribute('label'));
     $element = $this->find(sprintf($this->storeGroup, $selectedLabel), Locator::SELECTOR_XPATH);
     $value .= '/' . trim($element->getAttribute('label'), chr(0xc2) . chr(0xa0));
     $value .= '/' . $selectedLabel;
     return $value;
 }
 /**
  * Get the value of form element.
  *
  * @return string
  * @throws \Exception
  */
 public function getValue()
 {
     $this->eventManager->dispatchEvent(['get_value'], [(string) $this->getAbsoluteSelector()]);
     $selectedLabel = parent::getValue();
     if ($selectedLabel == '') {
         throw new \Exception('Selected value has not been found in optgroup select.');
     }
     $element = $this->find(sprintf($this->optGroup, $selectedLabel), Locator::SELECTOR_XPATH);
     $value = trim($element->getAttribute('label'), chr(0xc2) . chr(0xa0));
     $value .= '/' . $selectedLabel;
     return $value;
 }
 public function __construct()
 {
     parent::__construct();
 }
 /**
  * (non-PHPdoc)
  * @see \vxPHP\Form\FormElement\FormElementWithOptions\SelectElement::render()
  */
 public function render($force = FALSE)
 {
     $this->setAttribute('multiple', 'multiple');
     return parent::render($force);
 }
 /**
  * Return Wrapped Element.
  * If element was not created before:
  * 1. Context is defined. If context was not passed to constructor - test case (all page) is taken as context
  * 2. Attempt to get selenium element is performed in loop
  * that is terminated if element is found or after timeout set in configuration
  *
  * @param bool $waitForElementPresent
  * @return \PHPUnit_Extensions_Selenium2TestCase_Element_Select
  * @throws \PHPUnit_Extensions_Selenium2TestCase_WebDriverException
  */
 protected function _getWrappedElement($waitForElementPresent = true)
 {
     return $this->_driver->select(parent::_getWrappedElement($waitForElementPresent));
 }