You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Web applications can utilise the Storage Access API to get unpartitioned access to third-party cookies across different websites. When the Storage Access API is used to request this unpartitioned access for the first time, browsers will show a permission dialog to the user in order to accept or deny the storage-access. To my knowledge, automating the permission grant and, as a result, resolving the permission dialog is currently not possible in Playwright (I could not find a permission value in the documentation to automatically grant this permission to sites). Therefore, I would suggest adding a permissions value that can be used to automate granting the storage-access permission to websites.
The feature can be used to grant the storage-access permission to websites without manually resolving the permission dialog in the browser. The following code is an example how the feature could look like to automatically grant the permission to websites:
const{ chromium }=require('playwright');(async()=>{constbrowser=awaitchromium.launch();// Granting the storage-access permission to the contextconstcontext=awaitbrowser.newContext({permissions: ["storage-access"]});awaitcontext.close();awaitbrowser.close();})();
Motivation
During automated testing, encountering permission dialogs disrupt the test flow and require manual interaction, which defeats the purpose of automation. By enabling automatic storage-access permission granting and resolving the permission dialog, Playwright can provide a more seamless and efficient testing experience for websites using the Storage Access API.
Additionally, with all major browsers transitioning to storage partitioning, the Storage Access API has become the sole method for utilising third-party cookies across different websites. Without the ability to automatically grant this permission, it is impossible to perform the automated testing of websites using third-party cookies in a real-world scenario where the user would grant the storage-access permission to the website.
The text was updated successfully, but these errors were encountered:
🚀 Feature Request
Web applications can utilise the Storage Access API to get unpartitioned access to third-party cookies across different websites. When the Storage Access API is used to request this unpartitioned access for the first time, browsers will show a permission dialog to the user in order to accept or deny the storage-access. To my knowledge, automating the permission grant and, as a result, resolving the permission dialog is currently not possible in Playwright (I could not find a permission value in the documentation to automatically grant this permission to sites). Therefore, I would suggest adding a permissions value that can be used to automate granting the storage-access permission to websites.
Sources Storage Access API:
Example
The feature can be used to grant the storage-access permission to websites without manually resolving the permission dialog in the browser. The following code is an example how the feature could look like to automatically grant the permission to websites:
Motivation
During automated testing, encountering permission dialogs disrupt the test flow and require manual interaction, which defeats the purpose of automation. By enabling automatic storage-access permission granting and resolving the permission dialog, Playwright can provide a more seamless and efficient testing experience for websites using the Storage Access API.
Additionally, with all major browsers transitioning to storage partitioning, the Storage Access API has become the sole method for utilising third-party cookies across different websites. Without the ability to automatically grant this permission, it is impossible to perform the automated testing of websites using third-party cookies in a real-world scenario where the user would grant the storage-access permission to the website.
The text was updated successfully, but these errors were encountered: