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

Method request

py/selenium/webdriver/remote/webdriver.py:1420–1437  ·  view source on GitHub ↗

Returns an APIRequestContext for making HTTP requests with browser cookie sync. Returns: An APIRequestContext instance bound to this driver. Examples: ``` response = driver.request.get("https://api.example.com/data") assert response.o

(self)

Source from the content-addressed store, hash-verified

1418
1419 @property
1420 def request(self) -> APIRequestContext:
1421 """Returns an APIRequestContext for making HTTP requests with browser cookie sync.
1422
1423 Returns:
1424 An APIRequestContext instance bound to this driver.
1425
1426 Examples:
1427 ```
1428 response = driver.request.get("https://api.example.com/data")
1429 assert response.ok
1430 data = response.json()
1431 ```
1432 """
1433 if self._request is None:
1434 from selenium.webdriver.common.api_request_context import APIRequestContext
1435
1436 self._request = APIRequestContext(self)
1437 return self._request
1438
1439 def _get_cdp_details(self):
1440 import json

Callers 15

calculate_hashFunction · 0.45
get_edge_versionsFunction · 0.45
get_edgedriver_versionFunction · 0.45
get_edgedriver_urlFunction · 0.45
verify_urlFunction · 0.45
geckodriverFunction · 0.45
firefox_version_dataFunction · 0.45
get_chrome_milestoneFunction · 0.45
fetch_and_saveFunction · 0.45
flatten_browser_pdlFunction · 0.45
add_pdlsFunction · 0.45

Calls 1

APIRequestContextClass · 0.90

Tested by

no test coverage detected