diff --git a/src/Drupal/DrupalExtension/Manager/DrupalAuthenticationManager.php b/src/Drupal/DrupalExtension/Manager/DrupalAuthenticationManager.php index 2b5ee3f3..3a12fb03 100644 --- a/src/Drupal/DrupalExtension/Manager/DrupalAuthenticationManager.php +++ b/src/Drupal/DrupalExtension/Manager/DrupalAuthenticationManager.php @@ -103,6 +103,7 @@ public function logIn(\stdClass $user) public function logout() { $this->getSession()->visit($this->locatePath($this->getDrupalText('logout_url'))); + $this->getSession()->getPage()->findButton($this->getDrupalText('log_out'))->click(); $this->userManager->setCurrentUser(false); // Log the user out on the backend if possible.