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

Method provideResponse

javascript/selenium-webdriver/bidi/network.js:350–361  ·  view source on GitHub ↗

* Provides a response for the network. * * @param {ProvideResponseParameters} params - The parameters for providing the response. * @throws {Error} If params is not an instance of ProvideResponseParameters. * @returns {Promise } A promise that resolves when the command is sent.

(params)

Source from the content-addressed store, hash-verified

348 * @returns {Promise<void>} A promise that resolves when the command is sent.
349 */
350 async provideResponse(params) {
351 if (!(params instanceof ProvideResponseParameters)) {
352 throw new Error(`Params must be an instance of ProvideResponseParameters. Received:'${params}'`)
353 }
354
355 const command = {
356 method: 'network.provideResponse',
357 params: Object.fromEntries(params.asMap()),
358 }
359
360 await this.bidi.send(command)
361 }
362
363 /**
364 * Sets the cache behavior for network requests.

Callers 1

Calls 2

asMapMethod · 0.65
sendMethod · 0.65

Tested by

no test coverage detected