diff -u b/core/profiles/demo_umami/modules/demo_umami_content/tests/src/Functional/UninstallDefaultContentTest.php b/core/profiles/demo_umami/modules/demo_umami_content/tests/src/Functional/UninstallDefaultContentTest.php --- b/core/profiles/demo_umami/modules/demo_umami_content/tests/src/Functional/UninstallDefaultContentTest.php +++ b/core/profiles/demo_umami/modules/demo_umami_content/tests/src/Functional/UninstallDefaultContentTest.php @@ -99,8 +99,8 @@ $assert = $this->assertSession(); $this->drupalGet('/recipes'); $assert->pageTextContains('Super easy vegetarian pasta bake'); - $img_alt_text = $assert->elementExists('xpath', '//*[@id="block-umami-banner-recipes"]/div/div[1]/img')->getAttribute('alt'); - $this->assertEquals('Mouth watering vegetarian pasta bake with rich tomato sauce and cheese toppings', $img_alt_text, 'Image alt is matching'); + $img_alt_text = $assert->elementExists('css', '#block-umami-banner-recipes img')->getAttribute('alt'); + $this->assertEquals('Mouth watering vegetarian pasta bake with rich tomato sauce and cheese toppings', $img_alt_text); $count = $block_storage->getQuery() ->condition('type', 'banner_block')