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
Suggestion: Add reset_permissions() method to sb_cdp to clear granted/denied browser permissions
Hi again
Following up on the grant_permissions() suggestion (thanks for the implementation), it would also be very useful to expose the Browser.resetPermissions method through sb_cdp.
This allows restoring the default permission state, which is particularly useful when running multiple tests that depend on different permission scenarios.
💡 Suggested Implementation
In undetected -> cdp_driver -> browser:
asyncdefreset_permissions(self):
"""Reset all browser permissions """awaitself.connection.send(cdp.browser.reset_permissions())
In core -> sb_cdp:
defreset_permissions(self):
"""Reset all browser permissions."""driver=self.driverifhasattr(driver, "cdp_base"):
driver=driver.cdp_basereturnself.loop.run_until_complete(
driver.reset_permissions()
)