diff --git a/search_api_autocomplete.info.yml b/search_api_autocomplete.info.yml
index 60c005e..c7bb1e2 100644
--- a/search_api_autocomplete.info.yml
+++ b/search_api_autocomplete.info.yml
@@ -1,7 +1,7 @@
 name: Search API Autocomplete
 description: "Adds autocomplete functionality to searches."
 dependencies:
-  - drupal:system (>=8.5)
+  - drupal:system (>=8.6)
   - search_api:search_api
 core: 8.x
 type: module
diff --git a/tests/src/FunctionalJavascript/IntegrationTest.php b/tests/src/FunctionalJavascript/IntegrationTest.php
index 6e74202..cc008b4 100644
--- a/tests/src/FunctionalJavascript/IntegrationTest.php
+++ b/tests/src/FunctionalJavascript/IntegrationTest.php
@@ -100,7 +100,6 @@ protected function enableSearch() {
     $assert_session = $this->assertSession();
 
     $this->drupalGet($this->getAdminPath());
-    $assert_session->statusCodeEquals(200);
 
     // Check whether all expected groups and searches are present.
     $assert_session->pageTextContains('Search views');
@@ -116,7 +115,6 @@ protected function enableSearch() {
 
     $this->click('[data-drupal-selector="edit-actions-submit"]');
     $this->logPageChange(NULL, 'POST');
-    $assert_session->statusCodeEquals(200);
     $assert_session->pageTextContains('The settings have been saved. Please remember to set the permissions for the newly enabled searches.');
   }
 
@@ -128,7 +126,6 @@ protected function configureSearch() {
 
     $this->click('.dropbutton-action a[href$="/edit"]');
     $this->logPageChange();
-    $assert_session->statusCodeEquals(200);
     $assert_session->addressEquals($this->getAdminPath('edit'));
 
     // The "Server" suggester shouldn't be available at that point.
@@ -211,7 +208,6 @@ protected function checkSearchAutocomplete($click_url_suggestion = FALSE) {
     $assert_session = $this->assertSession();
 
     $this->drupalGet('search-api-autocomplete-test');
-    $assert_session->statusCodeEquals(200);
 
     $assert_session->elementAttributeContains('css', 'input[data-drupal-selector="edit-keys"]', 'data-search-api-autocomplete-search', $this->searchId);
 
@@ -308,7 +304,6 @@ protected function checkLiveResultsAutocomplete() {
 
     // Get the autocompletion results.
     $this->drupalGet('search-api-autocomplete-test');
-    $assert_session->statusCodeEquals(200);
     $suggestions = [];
     foreach ($this->getAutocompleteSuggestions() as $element) {
       $label = $this->getElementText($element, '.autocomplete-suggestion-label');
@@ -362,10 +357,8 @@ protected function checkCustomAutocompleteScript() {
       'suggesters[settings][custom_script][path]' => $path,
     ];
     $this->submitForm($edit, 'Save');
-    $assert_session->statusCodeEquals(200);
 
     $this->drupalGet('search-api-autocomplete-test');
-    $assert_session->statusCodeEquals(200);
 
     $assert_session->elementAttributeContains('css', 'input[data-drupal-selector="edit-keys"]', 'data-search-api-autocomplete-search', $this->searchId);
 
@@ -413,7 +406,6 @@ protected function checkHooks() {
     $assert_session->pageTextNotContains('Test suggester');
 
     $this->drupalGet('search-api-autocomplete-test');
-    $assert_session->statusCodeEquals(200);
     $assert_session->pageTextContains("Creek Mary's Blood");
 
     $autocomplete_path = "search_api_autocomplete/{$this->searchId}";
@@ -473,13 +465,13 @@ protected function checkAutocompleteAccess() {
       }
 
       $this->drupalGet('search-api-autocomplete-test');
-      $assert_session->statusCodeEquals(200);
       $element = $assert_session->elementExists('css', 'input[data-drupal-selector="edit-keys"]');
       $this->assertFalse($element->hasAttribute('data-search-api-autocomplete-search'), "Autocomplete should not be enabled for $user_type user without the necessary permission.");
       $this->assertFalse($element->hasClass('form-autocomplete'), "Autocomplete should not be enabled for $user_type user without the necessary permission.");
 
       $this->drupalGet($autocomplete_path, ['query' => ['q' => 'test']]);
-      $assert_session->statusCodeEquals(403);
+      $assert_session->pageTextContains('Access denied');
+      $assert_session->pageTextContains('You are not authorized to access this page.');
 
       $rid = $account ? 'authenticated' : 'anonymous';
       $role = Role::load($rid);
@@ -487,14 +479,12 @@ protected function checkAutocompleteAccess() {
       $role->save();
 
       $this->drupalGet('search-api-autocomplete-test');
-      $assert_session->statusCodeEquals(200);
       $element = $assert_session->elementExists('css', 'input[data-drupal-selector="edit-keys"]');
       $this->assertTrue($element->hasAttribute('data-search-api-autocomplete-search'), "Autocomplete should not be enabled for $user_type user without the necessary permission.");
       $this->assertContains($this->searchId, $element->getAttribute('data-search-api-autocomplete-search'), "Autocomplete should not be enabled for $user_type user without the necessary permission.");
       $this->assertTrue($element->hasClass('form-autocomplete'), "Autocomplete should not be enabled for $user_type user without the necessary permission.");
 
       $this->drupalGet($autocomplete_path, ['query' => ['q' => 'test']]);
-      $assert_session->statusCodeEquals(200);
     }
     $this->drupalLogin($this->adminUser);
   }
@@ -503,6 +493,8 @@ protected function checkAutocompleteAccess() {
    * Verifies that admin pages are properly protected.
    */
   protected function checkAdminAccess() {
+    $assert_session = $this->assertSession();
+
     // Make sure anonymous and non-admin users cannot access admin pages.
     $users = [
       'non-admin' => $this->normalUser,
@@ -520,8 +512,9 @@ protected function checkAdminAccess() {
       }
       foreach ($paths as $label => $path) {
         $this->drupalGet($path);
-        $status_code = $this->getSession()->getStatusCode();
-        $this->assertEquals(403, $status_code, "The $label is accessible for $user_type users.");
+        $this->getSession()->getStatusCode();
+        $assert_session->pageTextContains('Access denied');
+        $assert_session->pageTextContains('You are not authorized to access this page.');
       }
     }
     $this->drupalLogin($this->adminUser);
@@ -584,36 +577,4 @@ protected function logPageChange($url = NULL, $method = 'GET') {
     $this->htmlOutput($html_output);
   }
 
-  /**
-   * Asserts that the specified element exists and is visible.
-   *
-   * @param string $selector_type
-   *   The element selector type (CSS, XPath).
-   * @param string|array $selector
-   *   The element selector. Note: the first found element is used.
-   *
-   * @throws \Behat\Mink\Exception\ElementHtmlException
-   *   Thrown if the element doesn't exist.
-   */
-  protected function assertVisible($selector_type, $selector) {
-    $element = $this->assertSession()->elementExists($selector_type, $selector);
-    $this->assertTrue($element->isVisible(), "Element should be visible but isn't.");
-  }
-
-  /**
-   * Asserts that the specified element exists but is not visible.
-   *
-   * @param string $selector_type
-   *   The element selector type (CSS, XPath).
-   * @param string|array $selector
-   *   The element selector. Note: the first found element is used.
-   *
-   * @throws \Behat\Mink\Exception\ElementHtmlException
-   *   Thrown if the element doesn't exist.
-   */
-  protected function assertNotVisible($selector_type, $selector) {
-    $element = $this->assertSession()->elementExists($selector_type, $selector);
-    $this->assertFalse($element->isVisible(), "Element shouldn't be visible but is.");
-  }
-
 }
diff --git a/tests/src/FunctionalJavascript/IntegrationTestBase.php b/tests/src/FunctionalJavascript/IntegrationTestBase.php
index b7a93dc..c2f6d51 100644
--- a/tests/src/FunctionalJavascript/IntegrationTestBase.php
+++ b/tests/src/FunctionalJavascript/IntegrationTestBase.php
@@ -4,13 +4,13 @@
 
 use Behat\Mink\Driver\GoutteDriver;
 use Behat\Mink\Element\NodeElement;
-use Drupal\FunctionalJavascriptTests\JavascriptTestBase;
+use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
 use Drupal\search_api_test\PluginTestTrait;
 
 /**
  * Provides a base class for integration tests of this module.
  */
-abstract class IntegrationTestBase extends JavascriptTestBase {
+abstract class IntegrationTestBase extends WebDriverTestBase {
 
   use PluginTestTrait;
 
@@ -133,7 +133,7 @@ protected function logPageChange($url = NULL, $method = 'GET') {
    * @param string|array $selector
    *   The element selector. Note: the first found element is used.
    *
-   * @throws \Behat\Mink\Exception\ElementHtmlException
+   * @throws \Behat\Mink\Exception\ElementNotFoundException
    *   Thrown if the element doesn't exist.
    */
   protected function assertVisible($selector_type, $selector) {
@@ -149,7 +149,7 @@ protected function assertVisible($selector_type, $selector) {
    * @param string|array $selector
    *   The element selector. Note: the first found element is used.
    *
-   * @throws \Behat\Mink\Exception\ElementHtmlException
+   * @throws \Behat\Mink\Exception\ElementNotFoundException
    *   Thrown if the element doesn't exist.
    */
   protected function assertNotVisible($selector_type, $selector) {
diff --git a/tests/src/FunctionalJavascript/PagesIntegrationTest.php b/tests/src/FunctionalJavascript/PagesIntegrationTest.php
index 88d540d..2bdf2b3 100644
--- a/tests/src/FunctionalJavascript/PagesIntegrationTest.php
+++ b/tests/src/FunctionalJavascript/PagesIntegrationTest.php
@@ -105,7 +105,6 @@ protected function enableSearch() {
     // Save the settings.
     $this->click('[data-drupal-selector="edit-actions-submit"]');
     $this->logPageChange(NULL, 'POST');
-    $assert_session->statusCodeEquals(200);
     $assert_session->pageTextContains('The settings have been saved.');
     // Our admin user for this test doesn't have the "administer permissions"
     // permission, so the permission reminder should not be included.
@@ -114,7 +113,6 @@ protected function enableSearch() {
     // Edit the search.
     $this->click('.dropbutton-action a[href$="/edit"]');
     $this->logPageChange();
-    $assert_session->statusCodeEquals(200);
     $assert_session->addressEquals($this->getAdminPath('edit'));
     $edit = [
       'suggesters[enabled][server]' => TRUE,
@@ -161,7 +159,6 @@ protected function checkAutocompleteFunctionality() {
     $assert_session = $this->assertSession();
 
     $this->drupalGet('test-search');
-    $assert_session->statusCodeEquals(200);
 
     $assert_session->elementAttributeContains('css', 'input[data-drupal-selector="edit-keys"]', 'data-search-api-autocomplete-search', $this->searchId);
 
@@ -212,7 +209,6 @@ protected function checkAutocompleteFunctionality() {
     $this->drupalPostForm($this->getAdminPath('edit'), $edit, 'Save');
 
     $this->drupalGet('test-search');
-    $assert_session->statusCodeEquals(200);
 
     $elements = $this->getAutocompleteSuggestions();
     $this->assertCount(5, $elements);
