Unverified Commit c7381576 authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3314710 by alexpott, Spokje, longwave: dragTo random fails for example...

Issue #3314710 by alexpott, Spokje, longwave: dragTo random fails for example DrupalTestsfield_uiFunctionalJavascriptManageDisplayTest

(cherry picked from commit 4b98aae5)
(cherry picked from commit 931361f6)
(cherry picked from commit c0d437e7)
parent 151b5e45
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -214,4 +214,24 @@ private function waitFor($timeout, callable $callback) {
    return $result;
  }

  /**
   * {@inheritdoc}
   */
  public function dragTo($sourceXpath, $destinationXpath) {
    // Ensure both the source and destination exist at this point.
    $this->getWebDriverSession()->element('xpath', $sourceXpath);
    $this->getWebDriverSession()->element('xpath', $destinationXpath);

    try {
      parent::dragTo($sourceXpath, $destinationXpath);
    }
    catch (Exception $e) {
      // Do not care if this fails for any reason. It is a source of random
      // fails. The calling code should be doing assertions on the results of
      // dragging anyway. See upstream issues:
      // - https://github.com/minkphp/MinkSelenium2Driver/issues/97
      // - https://github.com/minkphp/MinkSelenium2Driver/issues/51
    }
  }

}