diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php index 5751368f61..e3ee318814 100644 --- a/core/tests/Drupal/Tests/BrowserTestBase.php +++ b/core/tests/Drupal/Tests/BrowserTestBase.php @@ -716,10 +716,11 @@ protected function drupalLogin(AccountInterface $account) { $this->drupalGet('user/login'); $this->assertSession()->statusCodeEquals(200); - $this->submitForm([ - 'name' => $account->getUsername(), - 'pass' => $account->passRaw, - ], t('Log in')); + + $page = $this->getSession()->getPage(); + $page->fillField('edit-name', $account->getUsername()); + $page->fillField('edit-pass', $account->passRaw); + $page->pressButton(t('Log in')); // @see BrowserTestBase::drupalUserIsLoggedIn() $account->sessionId = $this->getSession()->getCookie($this->getSessionName());