You are here

public function WebformCivicrmTestBase::assertFieldValue in Webform CiviCRM Integration 8.5

Assert populated values on the field. fieldValueEquals() fails for populated values on chromedriver > 91

Parameters

$id:

$value:

4 calls to WebformCivicrmTestBase::assertFieldValue()
CaseSubmissionTest::submitCaseAndVerifyResult in tests/src/FunctionalJavascript/CaseSubmissionTest.php
Submit Case and verify the result.
ContactSubmissionTest::testStaticAndAutocompleteOnContactElement in tests/src/FunctionalJavascript/ContactSubmissionTest.php
Test contact submission using static and autocomplete widget.
ContributionDummyTest::testSubmitContribution in tests/src/FunctionalJavascript/ContributionDummyTest.php
ExistingContactElementTest::testRenderingOfExistingContactElement in tests/src/FunctionalJavascript/ExistingContactElementTest.php
Verify if existing contact element is loaded as expected.

File

tests/src/FunctionalJavascript/WebformCivicrmTestBase.php, line 180

Class

WebformCivicrmTestBase

Namespace

Drupal\Tests\webform_civicrm\FunctionalJavascript

Code

public function assertFieldValue($id, $value) {
  $driver = $this
    ->getSession()
    ->getDriver();
  $fieldVal = $driver
    ->evaluateScript("document.getElementById('{$id}').value;");
  $this
    ->assertEquals($fieldVal, $value);
}