diff --git a/typo3/sysext/core/Tests/Acceptance/Application/Frontend/ContentElementsCest.php b/typo3/sysext/core/Tests/Acceptance/Application/Frontend/ContentElementsCest.php
index 5893a601fe5cd126b3b81c5c3b57fce1eedb70d2..c9530f9278fa6f9da681df44994759fe5be95391 100644
--- a/typo3/sysext/core/Tests/Acceptance/Application/Frontend/ContentElementsCest.php
+++ b/typo3/sysext/core/Tests/Acceptance/Application/Frontend/ContentElementsCest.php
@@ -35,6 +35,7 @@ class ContentElementsCest
         $I->waitForElement('#typo3-pagetree-tree .nodes .node', 5);
         $pageTree->openPath(['styleguide frontend demo']);
         $I->switchToContentFrame();
+        $I->waitForElementVisible('.t3js-module-docheader-bar a[title="View webpage"]');
         $I->click('.t3js-module-docheader-bar a[title="View webpage"]');
         $I->executeInSelenium(static function (RemoteWebDriver $webdriver) {
             $handles = $webdriver->getWindowHandles();
diff --git a/typo3/sysext/core/Tests/Acceptance/Application/Frontend/FormFrameworkCest.php b/typo3/sysext/core/Tests/Acceptance/Application/Frontend/FormFrameworkCest.php
index d0b68d8aa3b1ba9d698b804f75c6999dae8bcddc..1d27b98102ee4c7dbe48589123a3f5a4caa298b5 100644
--- a/typo3/sysext/core/Tests/Acceptance/Application/Frontend/FormFrameworkCest.php
+++ b/typo3/sysext/core/Tests/Acceptance/Application/Frontend/FormFrameworkCest.php
@@ -38,6 +38,7 @@ class FormFrameworkCest
         $I->waitForElement('#typo3-pagetree-tree .nodes .node', 5);
         $pageTree->openPath(['styleguide frontend demo']);
         $I->switchToContentFrame();
+        $I->waitForElementVisible('.t3js-module-docheader-bar a[title="View webpage"]');
         $I->click('.t3js-module-docheader-bar a[title="View webpage"]');
         $I->executeInSelenium(static function (RemoteWebDriver $webdriver) {
             $handles = $webdriver->getWindowHandles();
diff --git a/typo3/sysext/core/Tests/Acceptance/Application/Frontend/FrontendLoginCest.php b/typo3/sysext/core/Tests/Acceptance/Application/Frontend/FrontendLoginCest.php
index 48c55a2d004450e86f0af1c83b88ed271fd8f471..d50e5f1114bdc7c3a7e9f18d187a968a2d8df4dd 100644
--- a/typo3/sysext/core/Tests/Acceptance/Application/Frontend/FrontendLoginCest.php
+++ b/typo3/sysext/core/Tests/Acceptance/Application/Frontend/FrontendLoginCest.php
@@ -36,6 +36,7 @@ class FrontendLoginCest
         $I->waitForElement('#typo3-pagetree-tree .nodes .node', 5);
         $pageTree->openPath(['styleguide frontend demo']);
         $I->switchToContentFrame();
+        $I->waitForElementVisible('.t3js-module-docheader-bar a[title="View webpage"]');
         $I->click('.t3js-module-docheader-bar a[title="View webpage"]');
         $I->executeInSelenium(static function (RemoteWebDriver $webdriver) {
             $handles = $webdriver->getWindowHandles();
diff --git a/typo3/sysext/core/Tests/Acceptance/Application/Frontend/SitemapXmlCest.php b/typo3/sysext/core/Tests/Acceptance/Application/Frontend/SitemapXmlCest.php
index fe7e7e9ae5b1ae377d073addc213df93c8743e1a..98d2a8bf372b4283355e766ec63674bd08059f78 100644
--- a/typo3/sysext/core/Tests/Acceptance/Application/Frontend/SitemapXmlCest.php
+++ b/typo3/sysext/core/Tests/Acceptance/Application/Frontend/SitemapXmlCest.php
@@ -40,6 +40,7 @@ class SitemapXmlCest
         $I->waitForElement('#typo3-pagetree-tree .nodes .node', 5);
         $pageTree->openPath(['styleguide frontend demo']);
         $I->switchToContentFrame();
+        $I->waitForElementVisible('.t3js-module-docheader-bar a[title="View webpage"]');
         $I->click('.t3js-module-docheader-bar a[title="View webpage"]');
         $I->executeInSelenium(function (RemoteWebDriver $webdriver) {
             $handles = $webdriver->getWindowHandles();