diff --git a/tests/src/Context/JoinupSearchContext.php b/tests/src/Context/JoinupSearchContext.php index dfdd0a2a1b749e29efee27237071a2a562932997..67fced56ec5e32cc828a52f386003201e2056cd8 100644 --- a/tests/src/Context/JoinupSearchContext.php +++ b/tests/src/Context/JoinupSearchContext.php @@ -628,9 +628,9 @@ public function launchSearchFromHeader(string $keywords): void { // so we cannot fake the pressing of the Enter key. We will simply // redirect to the search page. $this->visitPath('/'); - $page = $this->getSession()->getPage(); - $page->fillField('keys', $keywords); - $page->pressButton("Search site-wide"); + $field = $this->getSession()->getPage()->findField('keys'); + $field->setValue($keywords); + $field->getParent()->getParent()->submit(); $this->assertCurrentUrl($this->locatePath('search?keys=' . $keywords)); } }