phpunit-selenium
phpunit-selenium copied to clipboard
value() appends instead of replacing
//some input with default value 13: $blocks = $this->elements($this->using('css selector')->value('.product')); $block = $blocks[$order]; $quantityInput = $block->element($this->using('css selector')->value('.quantity input'))
$initialValue = $quantityInput->value(); //13
$quantityInput->value(4);
$wrongValue = $quantityInput->value(); //134
This is to be expected, as the parameter to value() is a sequence of key strokes to send to the element (for example you could send a Down Arrow or a Return. I documented this and added it to the API docs.
how to clean up the field?
$this->using('css selector')->clear(); $this->using('css selector')->value('.product')
Eating method which allows you to perform just 2 steps?