Repository navigation
Conversation
- Add explicit setuptools build-system and PEP 639 license metadata - Move dev tools to a PEP 735 dependency group instead of a published extra - Bump ruff, bandit, ssort, pre-commit; refresh uv.lock - Point the bandit pre-commit hook at requestium/ (it matched nothing) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01446x2ZH4bs3pKQ6mV84K1a
- try_add_cookie only suppresses cookie-rejection errors; others propagate with their message instead of a bare WebDriverException - ensure_add_cookie no longer mutates the caller's dict - Navigate over https for secure cookies (#97) - Replace substring domain match with an exact/subdomain check - Honor an explicit timeout=0 in ensure_element - RequestiumResponse copies the wrapped response's state instead of building a new class per response Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01446x2ZH4bs3pKQ6mV84K1a
…to Chrome - Session.close() (and leaving a with block) quits the driver (#177) - Give user-supplied drivers the DriverMixin helpers by swapping in a cached subclass; the old per-function patching skipped the selector property, so xpath/css/re failed on injected drivers including webdriver.Remote (#31) - Wrap every HTTP verb via request() instead of only get/post/put - Pass session proxies and a custom User-Agent to Requestium's own Chrome at launch; credentialed proxies are skipped with a warning (#96, #55, #37) - Carry secure/path/expiry when transferring cookies in both directions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01446x2ZH4bs3pKQ6mV84K1a
Fix examples that didn't match the API (keyword-only Session, missing comma, JS booleans), note Selenium Manager, and document close/context manager, Remote drivers, proxy/User-Agent carry-over, and https for secure cookies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01446x2ZH4bs3pKQ6mV84K1a
- Local HTTP server and forward proxy fixture so cookie tests no longer hit google.com/example.com - New tests for ensure_element states and timeouts, ensure_click DOM effects, driver-side parsing, and a Remote driver backed by a local chromedriver service (#31) - Collapse duplicated ensure_element_by_* and session init tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01446x2ZH4bs3pKQ6mV84K1a
Ruff 0.16 formats Python code fences in Markdown, so pre-commit rewrites these. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01446x2ZH4bs3pKQ6mV84K1a
Replace four ad-hoc HTTP servers with a single conftest LocalServer (forward proxy, request log, optional TLS listener), merge the agent-split cookie and session test files into functional modules (add_cookie, cookies, session, proxy, user_agent), and drop duplicate tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01446x2ZH4bs3pKQ6mV84K1a
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01446x2ZH4bs3pKQ6mV84K1a
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01446x2ZH4bs3pKQ6mV84K1a
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01446x2ZH4bs3pKQ6mV84K1a
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01446x2ZH4bs3pKQ6mV84K1a
Chrome tries http:// navigations over https first. With balanced HTTPS-First mode auto-enabled (e.g. Chrome 152 on CI runners) it does not fall back to http when the CONNECT through the test proxy fails, so every proxied page came up blank and cookie tests failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01446x2ZH4bs3pKQ6mV84K1a
Dependabot bumped init/analyze but left autobuild and upload-sarif on v4.31.10, and CodeQL refuses to run with mismatched versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01446x2ZH4bs3pKQ6mV84K1a
| if certfile: | ||
| context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) | ||
| context.load_cert_chain(certfile) | ||
| self.socket = context.wrap_socket(self.socket, server_side=True) |
| def test_secure_cookie_navigates_over_https(secure_chrome: DriverMixin, https_server: LocalServer) -> None: | ||
| secure_chrome.ensure_add_cookie({"name": "sec", "value": "1", "domain": "app.secure.com", "secure": True}) | ||
|
|
||
| assert secure_chrome.current_url.startswith("https://app.secure.com") |
| def test_insecure_cookie_navigates_over_http(chrome: DriverMixin, server: LocalServer) -> None: | ||
| chrome.ensure_add_cookie({"name": "plain", "value": "1", "domain": "plain.example.com"}) | ||
|
|
||
| assert chrome.current_url.startswith("http://plain.example.com") |
| chrome.ensure_add_cookie({"name": "sub", "value": "1", "domain": "ample.com"}) | ||
|
|
||
| assert ("GET", "ample.com", "/") in server.requests() | ||
| assert chrome.current_url.startswith("http://ample.com") |
| chrome.ensure_add_cookie({"name": "parent", "value": "1", "domain": ".example.com"}) | ||
|
|
||
| assert len(server.requests()) == before | ||
| assert chrome.current_url.startswith("http://sub.example.com") |
This was referenced Oct 1, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug fixes, issue fixes, dependency updates, and an offline test suite. Bumps the version to 0.6.0.
Behavior changes
Session.close()and leaving awith Session()block now quit the webdriver, including a driver you passed in (requestium.Session doesn't quit driver when exiting #177).webdriver.Remote, selenium-wire, ...) now get everyDriverMixinhelper. Before this,driver.xpath/css/reraisedAttributeErroron them because the old per-function patching skipped theselectorproperty (How to implement webdriver.Remote() function? #31).RequestiumResponse. Before, only get/post/put did.proxies(--proxy-server) and a customUser-Agentat launch. Proxies with credentials are skipped with a warning. Other headers aren't synced (Initialize default Chrome browser in Session with existing proxies/headers #96, Why can't I use request features also in selenium? #55, Why not synchronize the request header between selenium and requests ? #37).ensure_add_cookienavigates over https forsecurecookies (Investigate whether cookies can be set with https prefix #97).Bug fixes
try_add_cookiere-raised every Selenium error as a bareWebDriverExceptionwith the message stripped, so the fallback to a broader cookie domain almost never ran. It now suppresses only cookie-rejection errors.ensure_add_cookieno longer changes the dict you pass in. Its domain check no longer matches substrings ("ample.com" used to count as "example.com").ensure_element(timeout=0)is honored now.secure,pathandexpiry.RequestiumResponseno longer creates a new class for every response.Dependencies and tooling
uv lock --upgrade(selenium 4.40 → 4.50, ruff 0.14 → 0.16, etc.). Runtime lower bounds are unchanged; I checked them by testing against the lowest allowed versions.[build-system]and PEP 639 license metadata.devextra to a PEP 735 dependency group. CI now installs--group dev.^src, which matches nothing in this repo, so it never ran. It now targetsrequestium/.Tests (#93)
LocalServerfixture serves pages, records requests, and acts as an HTTP forward proxy, so the cookie tests use realistic hostnames without reaching the internet.ensure_clickDOM effects, driver-side parsing, a Remote driver backed by a local chromedriver service, close/lifecycle, all HTTP verbs, and proxy/User-Agent launch arguments.Docs
CLAUDE.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01446x2ZH4bs3pKQ6mV84K1a