Пример #1
0
 /**
  * @see Behat\Mink\Driver\DriverInterface::setValue()
  */
 public function setValue($xpath, $value)
 {
     $path = SeleniumLocator::xpath($xpath);
     if (!empty($value)) {
         $typePart = substr($value, 0, -1);
         $typeKeysPart = substr($value, -1);
     } else {
         $typePart = $typeKeysPart = '';
     }
     $this->browser->type($path, '');
     $this->browser->type($path, $typePart);
     $this->focus($path);
     $this->browser->typeKeys($path, $typeKeysPart);
     $this->blur($path);
 }