MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / setPermission

Method setPermission

javascript/selenium-webdriver/chromium.js:758–762  ·  view source on GitHub ↗

* Set a permission state to the given value. * * @param {string} name A name of the permission to update. * @param {("granted"|"denied"|"prompt")} state State to set permission to. * @returns {!Promise } A promise that will be resolved when the * command has finished. *

(name, state)

Source from the content-addressed store, hash-verified

756 * names
757 */
758 setPermission(name, state) {
759 return this.execute(
760 new command.Command(Command.SET_PERMISSION).setParameter('descriptor', { name }).setParameter('state', state),
761 )
762 }
763
764 /**
765 * Sends a DevTools command to change the browser's download directory.

Callers

nothing calls this directly

Calls 2

setParameterMethod · 0.80
executeMethod · 0.65

Tested by

no test coverage detected