ddev-selenium-standalone-chrome icon indicating copy to clipboard operation
ddev-selenium-standalone-chrome copied to clipboard

Version 2.0.0 not working with Drupal 10.5

Open erikrau opened this issue 4 months ago • 2 comments

Preliminary checklist

  • [x] I am using the latest stable version of DDEV
  • [x] I am using the latest stable version of this add-on

Expected Behavior

Running FunctionalJavascript tests e.g. ../vendor/bin/phpunit -c ./core/phpunit.xml.dist ./core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php is working.

Actual Behavior

Error message: `erauch@project-web:/var/www/html/web$ ../vendor/bin/phpunit -c ./core/phpunit.xml.dist ./core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php PHPUnit 9.6.27 by Sebastian Bergmann and contributors.

Testing Drupal\Tests\system\FunctionalJavascript\FrameworkTest EEE 3 / 3 (100%)

Time: 00:14.722, Memory: 12.00 MB

There were 3 errors:

  1. Drupal\Tests\system\FunctionalJavascript\FrameworkTest::testLazyLoad WebDriver\Exception\CurlExec: Curl error thrown for http POST to http://selenium-chrome:4444/wd/hub/session/8c821b57cbbd0185e95051555b448de5/element/f.40B3CCC7EFD6AAF74963A97BD24FE3E0.d.425B439D3408664E50C9167F6F7D1054.e.18/click

The requested URL returned error: 400

/var/www/html/vendor/lullabot/php-webdriver/lib/WebDriver/Exception.php:198 /var/www/html/web/core/tests/Drupal/FunctionalJavascriptTests/WebDriverCurlService.php:152 /var/www/html/vendor/lullabot/php-webdriver/lib/WebDriver/AbstractWebDriver.php:166 /var/www/html/vendor/lullabot/php-webdriver/lib/WebDriver/AbstractWebDriver.php:287 /var/www/html/vendor/lullabot/php-webdriver/lib/WebDriver/Container.php:231 /var/www/html/vendor/lullabot/mink-selenium2-driver/src/Selenium2Driver.php:861 /var/www/html/vendor/lullabot/mink-selenium2-driver/src/Selenium2Driver.php:853 /var/www/html/web/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php:123 /var/www/html/web/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php:210 /var/www/html/web/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php:121 /var/www/html/vendor/behat/mink/src/Element/NodeElement.php:176 /var/www/html/vendor/behat/mink/src/Element/NodeElement.php:186 /var/www/html/vendor/behat/mink/src/Element/TraversableElement.php:119 /var/www/html/web/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php:52 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

  1. Drupal\Tests\system\FunctionalJavascript\FrameworkTest::testCurrentPathChange WebDriver\Exception\CurlExec: Curl error thrown for http POST to http://selenium-chrome:4444/wd/hub/session/d1cb6bebcc799e13bfe1099720e188dc/element/f.37DA647FAC522EBDC216BC36BB0758B7.d.B4C4B20019AE51F25FDA15FA411092EE.e.17/click

The requested URL returned error: 400

/var/www/html/vendor/lullabot/php-webdriver/lib/WebDriver/Exception.php:198 /var/www/html/web/core/tests/Drupal/FunctionalJavascriptTests/WebDriverCurlService.php:152 /var/www/html/vendor/lullabot/php-webdriver/lib/WebDriver/AbstractWebDriver.php:166 /var/www/html/vendor/lullabot/php-webdriver/lib/WebDriver/AbstractWebDriver.php:287 /var/www/html/vendor/lullabot/php-webdriver/lib/WebDriver/Container.php:231 /var/www/html/vendor/lullabot/mink-selenium2-driver/src/Selenium2Driver.php:861 /var/www/html/vendor/lullabot/mink-selenium2-driver/src/Selenium2Driver.php:853 /var/www/html/web/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php:123 /var/www/html/web/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php:210 /var/www/html/web/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php:121 /var/www/html/vendor/behat/mink/src/Element/NodeElement.php:176 /var/www/html/vendor/behat/mink/src/Element/NodeElement.php:186 /var/www/html/vendor/behat/mink/src/Element/TraversableElement.php:119 /var/www/html/web/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php:95 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

  1. Drupal\Tests\system\FunctionalJavascript\FrameworkTest::testLazyLoadOverriddenCSS WebDriver\Exception\CurlExec: Curl error thrown for http POST to http://selenium-chrome:4444/wd/hub/session/a41319f91ffd4df938999cb599b702f3/element/f.96273D50F9B840FB46985309D2DD38CA.d.5DE3352E843F7FCF17286E6BC355D9B7.e.19/click

The requested URL returned error: 400

/var/www/html/vendor/lullabot/php-webdriver/lib/WebDriver/Exception.php:198 /var/www/html/web/core/tests/Drupal/FunctionalJavascriptTests/WebDriverCurlService.php:152 /var/www/html/vendor/lullabot/php-webdriver/lib/WebDriver/AbstractWebDriver.php:166 /var/www/html/vendor/lullabot/php-webdriver/lib/WebDriver/AbstractWebDriver.php:287 /var/www/html/vendor/lullabot/php-webdriver/lib/WebDriver/Container.php:231 /var/www/html/vendor/lullabot/mink-selenium2-driver/src/Selenium2Driver.php:861 /var/www/html/vendor/lullabot/mink-selenium2-driver/src/Selenium2Driver.php:806 /var/www/html/vendor/behat/mink/src/Element/NodeElement.php:216 /var/www/html/vendor/behat/mink/src/Element/TraversableElement.php:218 /var/www/html/web/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php:123 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

ERRORS! Tests: 3, Assertions: 9, Errors: 3.

HTML output was generated`

Steps To Reproduce

  1. ddev version v1.24.8
  2. ddev-selenium-standalone-chrome │ 2.0.0
  3. Drupal 10.5.3
  4. No changes to config.selenium-standalone-chrome.yaml
  5. ddev start
  6. ddev ssh
  7. cd web
  8. ../vendor/bin/phpunit -c ./core/phpunit.xml.dist ./core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php

Anything else?

I'm using DDEV in WSL2 in Windows 11. I downgraded the add-on to version 1.2.3 and the test is working.

erikrau avatar Oct 27 '25 10:10 erikrau

Disable w3c in MINK_DRIVER_ARGS_WEBDRIVER. There is a Drupal core issue https://www.drupal.org/project/drupal/issues/3421202 for 10.5.x.

tobiasbaehr avatar Nov 02 '25 10:11 tobiasbaehr

Yes. Until that issue lands, Drupal 10 sites might want to stay on the 1.x release. I'm open to fixing this in 2.x if folks want to make an MR.

weitzman avatar Nov 02 '25 14:11 weitzman