* Deletes the cookie with the given name. This command is a no-op if there is * no cookie with the given name visible to the current page. * * @param {string} name The name of the cookie to delete. * @return {!Promise } A promise that will be resolved * when the cookie has be
(name)
| 2069 | * when the cookie has been deleted. |
| 2070 | */ |
| 2071 | deleteCookie(name) { |
| 2072 | // Validate the cookie name is non-empty and properly trimmed. |
| 2073 | if (!name?.trim()) { |
| 2074 | throw new error.InvalidArgumentError('Cookie name cannot be empty') |
| 2075 | } |
| 2076 | |
| 2077 | return this.driver_.execute(new command.Command(command.Name.DELETE_COOKIE).setParameter('name', name)) |
| 2078 | } |
| 2079 | |
| 2080 | /** |
| 2081 | * Retrieves all cookies visible to the current page. Each cookie will be |
nothing calls this directly
no test coverage detected