protected function pushFormField(&$els, $form, $name, $values)
    {
        $el = $form->findElements(WebDriverBy::name($name));

        if ($el) {
            $els[] = [$el, $values];
        } elseif (is_array($values)) {
            foreach ($values as $key => $value) {
                $this->pushFormField($els, $form, "{$name}[$key]", $value);
            }
        } else {
            throw new ElementNotFound($name);
        }
    }
protected function pushFormField(&$els, $form, $name, $values)
    {
        $el = $form->findElements(WebDriverBy::name($name));

        if ($el) {
            $els[] = [$el, $values];
        } elseif (is_array($values)) {
            foreach ($values as $key => $value) {
                $this->pushFormField($els, $form, "{$name}[$key]", $value);
            }
        } else {
            throw new ElementNotFound($name);
        }
    }
protected function pushFormField ( & $ els , $ form , $ name , $ values ) { $ el = $ form -> findElements ( WebDriverBy :: name ( $ name ) ) ; if ( $ el ) { $ els [ ] = [ $ el , $ values ] ; } elseif ( is_array ( $ values ) ) { foreach ( $ values as $ key => $ value ) { $ this -> pushFormField ( $ els , $ form , "{$name}[$key]" , $ value ) ; } } else { throw new ElementNotFound ( $ name ) ; } }
Map an array element passed to seeInFormFields to its corresponding WebDriver element,
recursing through array values if the field is not found.

@param array $els The previously found elements.
@param RemoteWebElement $form The form in which to search for fields.
@param string $name The field's name.
@param mixed $values
@return void
Map an array element passed to seeInFormFields to its corresponding WebDriver element recursing through array values if the field is not found .