src/Context/FormContext.php
public function iFillInFieldWithoutLoosingFocus($field, $value)
    {
        $driver = $this->getSession()->getDriver();
        if ('Behat\Mink\Driver\Selenium2Driver' != get_class($driver)) {
            $field = $this->fixStepArgument($field);
            $value = $this->fixStepArgument($value);

            $this->getSession()->getPage()->fillField($field, $value);
        } else {
            if (null === ($locator = $this->getSession()->getPage()->findField($field))) {
                throw new \Exception(sprintf('Field "%s" not found.', $field));
            }

            if (!($element = $driver->getWebDriverSession()->element('xpath', $locator->getXpath()))) {
                throw new \Exception(sprintf('Field "%s" not found.', $field));
            }

            $element->postValue(['value' => [$value]]);
        }
    }
public function iFillInFieldWithoutLoosingFocus($field, $value)
    {
        $driver = $this->getSession()->getDriver();
        if ('Behat\Mink\Driver\Selenium2Driver' != get_class($driver)) {
            $field = $this->fixStepArgument($field);
            $value = $this->fixStepArgument($value);

            $this->getSession()->getPage()->fillField($field, $value);
        } else {
            if (null === ($locator = $this->getSession()->getPage()->findField($field))) {
                throw new \Exception(sprintf('Field "%s" not found.', $field));
            }

            if (!($element = $driver->getWebDriverSession()->element('xpath', $locator->getXpath()))) {
                throw new \Exception(sprintf('Field "%s" not found.', $field));
            }

            $element->postValue(['value' => [$value]]);
        }
    }
public function iFillInFieldWithoutLoosingFocus ( $ field , $ value ) { $ driver = $ this -> getSession ( ) -> getDriver ( ) ; if ( 'Behat\Mink\Driver\Selenium2Driver' != get_class ( $ driver ) ) { $ field = $ this -> fixStepArgument ( $ field ) ; $ value = $ this -> fixStepArgument ( $ value ) ; $ this -> getSession ( ) -> getPage ( ) -> fillField ( $ field , $ value ) ; } else { if ( null === ( $ locator = $ this -> getSession ( ) -> getPage ( ) -> findField ( $ field ) ) ) { throw new \ Exception ( sprintf ( 'Field "%s" not found.' , $ field ) ) ; } if ( ! ( $ element = $ driver -> getWebDriverSession ( ) -> element ( 'xpath' , $ locator -> getXpath ( ) ) ) ) { throw new \ Exception ( sprintf ( 'Field "%s" not found.' , $ field ) ) ; } $ element -> postValue ( [ 'value' => [ $ value ] ] ) ; } }
Fills in form field with specified id|name|label|value without unfocus field

@When /^(?:|I )fill in "(?P<field>(?:[^"]|\\")*)" with "(?P<value>(?:[^"]|\\")*)" without loosing focus$/
@When /^(?:|I )fill in "(?P<value>(?:[^"]|\\")*)" for "(?P<field>(?:[^"]|\\")*)" without loosing focus$/
Fills in form field with specified id|name|label|value without unfocus field