You are here

public function ElementContext::clearField in Lightning Core 8.4

Same name and namespace in other branches
  1. 8.5 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::clearField()
  2. 8 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::clearField()
  3. 8.2 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::clearField()
  4. 8.3 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::clearField()

Clears a field.

@When I clear :field

Parameters

string $field: The field to clear.

\Behat\Mink\Element\ElementInterface $container: (optional) The element that contains the field.

File

tests/contexts/ElementContext.behat.inc, line 55

Class

ElementContext
Contains miscellaneous step definitions for working with HTML elements.

Namespace

Acquia\LightningExtension\Context

Code

public function clearField($field, ElementInterface $container = NULL) {
  $this
    ->assertSession()
    ->fieldExists($field, $container)
    ->setValue(FALSE);
}