From 22ef85df48886714d8331957cc0ee11816ff961a Mon Sep 17 00:00:00 2001
From: catch <catch56@gmail.com>
Date: Fri, 14 Oct 2022 15:16:26 +0100
Subject: [PATCH] Issue #3183423 by immaculatexavier, alexpott, quietone:
 Remove \Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver::attachFile()
 once upstream dependency has a new release

---
 .../DrupalSelenium2Driver.php                 | 26 -------------------
 1 file changed, 26 deletions(-)

diff --git a/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php b/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php
index ecbe96237742..537de3c476ad 100644
--- a/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php
+++ b/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php
@@ -44,32 +44,6 @@ public function setCookie($name, $value = NULL) {
     $this->getWebDriverSession()->setCookie($cookieArray);
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function attachFile($xpath, $path) {
-    $element = $this->getWebDriverSession()->element('xpath', $xpath);
-
-    if ('input' !== strtolower($element->name()) || 'file' !== strtolower($element->attribute('type'))) {
-      $message = 'Impossible to %s the element with XPath "%s" as it is not a %s input';
-
-      throw new DriverException(sprintf($message, 'attach a file on', $xpath, 'file'));
-    }
-
-    // Upload the file to Selenium and use the remote path. This will
-    // ensure that Selenium always has access to the file, even if it runs
-    // as a remote instance.
-    try {
-      $remotePath = $this->uploadFileAndGetRemoteFilePath($path);
-    }
-    catch (\Exception $e) {
-      // File could not be uploaded to remote instance. Use the local path.
-      $remotePath = $path;
-    }
-
-    $element->postValue(['value' => [$remotePath]]);
-  }
-
   /**
    * Uploads a file to the Selenium instance and returns the remote path.
    *
-- 
GitLab