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

Function add_header

py/test/selenium/webdriver/common/bidi_network_tests.py:325–328  ·  view source on GitHub ↗
(response: Response)

Source from the content-addressed store, hash-verified

323
324def test_change_response_headers(driver, pages):
325 def add_header(response: Response):
326 headers = response.headers.copy()
327 headers["x-modified"] = "true"
328 response.set_headers(headers)
329
330 handler_id = driver.network.add_response_handler(["**/formPage.html"], add_header)
331 try:

Callers

nothing calls this directly

Calls 2

copyMethod · 0.45
set_headersMethod · 0.45

Tested by

no test coverage detected