diff --git a/tests/acceptance/features/lib/FilesPageElement/SharingDialog.php b/tests/acceptance/features/lib/FilesPageElement/SharingDialog.php index 1913e8f82b0a..6cf135ec79fc 100644 --- a/tests/acceptance/features/lib/FilesPageElement/SharingDialog.php +++ b/tests/acceptance/features/lib/FilesPageElement/SharingDialog.php @@ -301,7 +301,7 @@ public function setSharingPermissions( $xpathLocator = \sprintf( $this->permissionsFieldByUserName, $shareReceiverName ); - $permissionsField = $this->find("xpath", $xpathLocator); + $permissionsField = $this->waitTillElementIsNotNull($xpathLocator); $this->assertElementNotNull( $permissionsField, __METHOD__