diff --git a/tests/acceptance/features/bootstrap/FilesAppContext.php b/tests/acceptance/features/bootstrap/FilesAppContext.php index 53d365b1b09bf..41c75b4ef176e 100644 --- a/tests/acceptance/features/bootstrap/FilesAppContext.php +++ b/tests/acceptance/features/bootstrap/FilesAppContext.php @@ -191,7 +191,7 @@ public static function shareLinkCheckbox() { // forThe()->checkbox("Share link") can not be used here; that would // return the checkbox itself, but the element that the user interacts // with is the label. - return Locator::forThe()->xpath("//label[normalize-space() = 'Share link']")-> + return Locator::forThe()->xpath("//*[@id='shareLink']//label[normalize-space() = 'Enable']")-> descendantOf(self::detailsView())-> describedAs("Share link checkbox in the details view in Files app"); }