Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.8.2] - 2026-07-17¶
Fixed — W3C WebDriver BiDi Spec Compliance¶
Network Module¶
continue_request:post_datanow sent asbodywithBytesValueinstead of rawpostDatafail_request: removed non-specerrorparameter — onlyrequestis sent per CDDLcontinue_response: removed non-specbodyparameter; addedcredentialsparameterprovide_response: body now wrapped asBytesValueper specadd_data_collector: replaced non-speccollectordict withdata_types,max_encoded_data_size, and optionalcollector_typepernetwork.AddDataCollectorParametersget_data: replaced non-speccontext/urlwithrequest(required),data_type(required), optionalcollectoranddisownpernetwork.GetDataParametersdisown_data: now requirescollector,request, anddata_typepernetwork.DisownDataParameters; removed non-specurl
Emulation Module¶
set_network_conditions: replaceddownload_throughput/upload_throughput/latencywith spec-compliantnetworkConditions: {type: "offline"}ornullperemulation.SetNetworkConditionsParametersset_user_agent: removed non-specaccept_languageandplatformparameters peremulation.SetUserAgentOverrideParametersset_screen_orientation: usesscreenOrientationkey (notorientation) with spec-compliant kebab-case types (e.g."portrait-primary") peremulation.SetScreenOrientationOverrideParameters
Protocol & Models¶
Cookie.expires: wire field is nowexpiry(alias) per W3C BiDi specHandleValue.handle: made optional (str | None) to supportownership: "none"scenarios
Infrastructure¶
setup_logging: now re-applies formatter to existing handlers on subsequent calls instead of silently discarding new format
Tests¶
- Updated all affected unit tests to assert spec-compliant wire formats
- Added regression tests for
HandleValuewithout handle - Added unit tests for
setup_loggingreconfiguration behavior
[1.8.1] - 2026-07-16¶
Added¶
New Modules¶
WebExtensionModule—install()anduninstall()for browser extension management (Bug 70)PermissionsModule—set_permission()for controlling browser permissions (separate W3C spec)
New Commands¶
BrowsingModule.close_browser()—browser.close(Bug 61)BrowsingModule.get_client_windows()—browser.getClientWindows(Bug 66)BrowsingModule.set_client_window_state()—browser.setClientWindowState(Bug 66)BrowsingModule.activate()—browsingContext.activateBrowsingModule.locate_nodes()—browsingContext.locateNodeswithserializationOptions(Bug 72)EmulationModule.set_locale()—emulation.setLocaleOverride(Bug 64)EmulationModule.set_screen_orientation()—emulation.setScreenOrientationOverride(Bug 64)NetworkModule.add_data_collector()/get_data()/disown_data()/remove_data_collector()(Bug 68)NetworkModule.set_cache_behavior()—network.setCacheBehavior(Bug 67)NetworkModule.set_extra_headers()—network.setExtraHeaders(Bug 65)ScriptModule.add_preload_script()/remove_preload_script()— with channel support (Bug 50)ScriptModule.get_realms()—script.getRealmsInputModule.set_files()—input.setFiles
New Events¶
BrowsingContextDownloadWillBeginEvent/BrowsingContextDownloadEndEvent(Bug 63)BrowsingContextUserPromptClosedEvent(Bug 62)BrowsingContextNavigationAbortedEvent/NavigationCommittedEvent/NavigationFailedEvent(Bug 48)BrowsingContextHistoryUpdatedEventInputFileDialogOpenedEvent(Bug 69)ScriptMessageEvent/ScriptRealmCreatedEvent/ScriptRealmDestroyedEvent
New Remote Value Types¶
DateValue,RegExpValue,MapValue,SetValue(Bug 55)WeakMapValue,WeakSetValue,GeneratorValue,ErrorValue,ProxyValue,PromiseValue(Bug 71)TypedArrayValue,ArrayBufferValue,NodeListValue,HTMLCollectionValue,WindowValue(Bug 71)ChannelValuefor preload script channel communication
New Protocol Models¶
ScriptSource— typedscript.Source(realm + context) forLogEntryAddedEventandScriptMessageEvent(Bug 74)NodeValue—nodePropertiesfield andsharedIdalias (Bug 73)ObjectValue/ArrayValue— parse nestedRemoteValueobjects viaRemoteValue.parse()(Bug 73)SerializationOptionssupport inevaluate,callFunction, andlocateNodes(Bug 72)
New Error Codes¶
- 11 new exception types:
NoSuchElementException,NoSuchCookieException,StaleElementReferenceException,ElementNotInteractableException,InsecureCertificateException,MoveTargetOutOfBoundsException,NoSuchAlertException,NoSuchShadowRootException,DetachedShadowRootException,InvalidWebExtensionException,NoSuchUserContextException(Bug 57)
New BiDiClient Convenience Methods¶
on_navigation_started(),on_navigation_aborted(),on_navigation_committed(),on_navigation_failed()on_user_prompt_closed(),on_download_will_begin(),on_download_end()on_script_message()
New Parameters¶
browser.createUserContext—acceptInsecureCertsparameterbrowsingContext.create—referenceContext,background, anduserContextin result (Bug 75)browsingContext.captureScreenshot—clipandoriginparametersemulation.setGeolocationOverride—userContextsanderrorparameters (Bug 74)emulation.setTimezoneOverride—userContextsparameter (Bug 74)network.addIntercept—url_patternsacceptsNetworkUrlPatterndicts (Bug 75)network.continueRequest—post_dataparameternetwork.continueResponse/provideResponse—cookiesparameternetwork.continueWithAuth— validatescredentialsrequired forprovideCredentialsnetwork.authRequiredevent — optionalresponsefieldscript.evaluate/callFunction—serializationOptions,userActivationparametersscript.callFunction—thisparameterstorage.getCookies—filterandpartitionKeyparametersstorage.setCookie/deleteCookies—partitionKeyparameterPreloadModule.add_script—userContextsparameter (Bug 76)session.subscribe— returns subscription result from server (Bug 76)
Changed¶
BrowsingContextNavigatedEventrenamed toBrowsingContextNavigationStartedEvent(backward-compatible alias kept)LogEntryAddedEvent.level—"warn"normalized to"warning"per W3C spec (Bug 52)LogEntryAddedEvent.type— changed toLiteral["console", "javascript"]per specLogEntryAddedEvent.source— typed asScriptSource(Bug 74)LogEntryAddedEvent.args— typed aslist[RemoteValue]with auto-parsing (Bug 75)LogEntryAddedEvent— addedstackTraceandmethodfields per specScriptMessageEvent.source— typed asScriptSource(Bug 74)ScriptRealmCreatedEvent.type— changed toLiteral["window", "dedicated-worker", "shared-worker", "service-worker", "worker"]per spec (Bug 45)BrowsingContextUserPromptOpenedEvent.type—Literal["alert", "confirm", "prompt", "beforeunload"](Bug 41)BrowsingContextUserPromptOpenedEvent.handler—Literal["accept", "dismiss", "default"] | None(Bug 42)BrowsingContextCreatedEvent—populate_by_name=True, aliases foruserContext/originalOpener(Bug 54)browsingContext.print— sendsprintBackgroundper spec instead ofbackground(Bug 74)browsingContext.print—pageRangesacceptslist[int | str]per specCookie.sameSite— normalized to lowercase (strict,lax,none) per specCookie.value— acceptsBytesValuedict format{type: 'base64', value: '...'}per spec (Bug 51)network.cancel_auth— usescontinueWithAuthwithaction="cancel"instead of non-existentnetwork.cancelAuthstorage.delete_cookie— usesdeleteCookieswith name filter instead of non-existentstorage.deleteCookiePage.wait_for_function— usesawaitPromise=Truewith Promise wrapper instead of client-side polling (Bug 77)Page.__aexit__— suppresses close exceptions only when already exiting with an exception (Bug 77)BiDiClient.set_auto_prompt/disable_auto_prompt— track subscription state, avoid duplicate subscribe/unsubscribe (Bug 77)- Network headers type annotations —
list[dict[str, Any]]for structured header values get_tree— returns typedGetTreeResultwithchildrenlist
Fixed¶
NETWORK_CANCEL_AUTHdead constant removed from constants.pySTORAGE_DELETE_COOKIEdead constant removed from constants.pyTransportConfig—max_queue/drop_policydead code removed (Bug 77)add_intercept— validates emptyphaseslistResponseBodyResult.total_size— default=0 for browsers that omittotalSizeNetworkDataReceivedEvent.data_size— default=0ObjectValue.value— normalizes list-of-pairs format from browsers (Bug 53)RemoteValue.parse— handles all spec types includingdate,regexp,map,set,weakmap,weakset,generator,error,proxy,promise,typedarray,arraybuffer,nodelist,htmlcollection,window(Bugs 46-49, 71)RemoteValue.parse— unwraps{type: "success", result: {...}}wrapper fromscript.evaluateRemoteValue.parse— raisesJavaScriptErroron{type: "exception"}responses
Tests¶
- 642 tests total (607 passed, 5 skipped, 3 xfailed, 27 new integration tests)
- Unit tests: 505+ covering all new events, commands, models, and convenience methods
- Integration tests: 43 tests (16 cross-module, 14 edge-case E2E, 13 new feature tests)
[1.8.0] - 2026-07-15¶
Fixed¶
Critical¶
reconnect—reject_allon pending commands during reconnectioncommand timeout— leak when command completes after timeout fireskey action types—keyDown/keyUpcorrectly typed per speccapability detection— proper parsing ofsession.statuscapabilities
High Priority¶
malformed JSONhandling — graceful error instead of crashevent parse errors— isolated per-event, no cascade failureasync dispatch— proper task scheduling for event handlersexception shadowing— original errors preserved in cleanup pathsauto-prompt ordering— subscribe before navigation, not after
Medium Priority¶
connection timeout— proper cleanup on connect failurereceive loop crash— guarded against unexpected message formatsclose cleanup— ordered shutdown prevents resource leaksfalsy checks—0/""/Falseno longer treated asNonelogging handlers— duplicate handlers prevented on reconfigureremote value types— correct parsing for edge-case typescontext leak— browsing contexts properly tracked and cleaneddouble-close— idempotent close onBiDiClientandPageexception masking—__aexit__preserves original exception
Low Priority¶
action model types—InputSource/KeyAction/PointerActionfield validationconstant names— aligned with W3C spec command nameserror code map— complete mapping of all BiDi error codesbytes handling— properBytesValueserializationquality validation— input validation on public API boundariesEventQueue— removed dead code
Tests¶
- Fixed test expectations for
keyDown/keyUp, capability defaults, prompt handler - Ruff lint and mypy type fixes for CI
[1.7.2] - 2025-07-04¶
Documentation¶
- Comprehensive usage docs for all new modules: Emulation, Permissions, Preload, CDP
- Updated browsing.md with viewport (ViewportSize + DPR), activate, locateNodes, all 9 event types
- Updated network.md with cache overrides, response body, authentication, 5 new event types
- Updated storage.md with delete_cookie and cookieChanged event
- Updated script.md with add_preload_script (channels), get_realms, realm events
- Added 7 new cookbook recipes (viewport, cache override, emulation, preload, cookies, response body, CDP)
- Enriched all API pages with method summaries and code examples
- Updated index.md with full feature list and documentation links
- Updated mkdocs.yml nav with 4 new usage pages
[1.7.1] - 2025-07-04¶
Documentation¶
- Complete protocol reference with all 53 commands and 21 events
- Added API doc pages for Preload, Emulation, Permissions, Log, and CDP modules
- Updated events.md with all event types and convenience handlers
- Added cache override, response body, and auth docs to network.md
- Added delete_cookie docs to storage.md
- Added script.addPreloadScript with channels docs to script.md
- Updated mkdocs.yml nav with new API pages
- Added Pydantic model mapping tables to protocol reference
[1.7.0] - 2025-07-04¶
Added¶
BrowsingContextHistoryUpdatedEvent— Chrome-specific event for history changes (pushState, replaceState)NetworkModule.response_body()— retrieves body of a completed response by request IDStorageModule.delete_cookie()— deletes a single cookie by name (vs delete_cookies by filter)ViewportSizemodel — typed viewport dimensions forset_viewport(accepts model or dict)ScriptModule.add_preload_script()— preload script with channel support for bidirectional communicationResponseBodyResult,ScriptAddPreloadScriptResultresult modelsparse_eventfactory updated with historyUpdated- Convenience handler:
on_history_updated() - 7 new unit tests (total: 226)
[1.6.5] - 2025-07-04¶
Added¶
NetworkModule.set_cache_override()— replaces all existing cache overrides in a single call (set vs add/remove pattern)- 2 new unit tests (total: 219)
[1.6.4] - 2025-07-04¶
Added¶
BrowsingContextDOMContentLoadedEvent— fires when DOM is parsed but resources still loading (before load)NetworkSamplingStateChangedEvent— fires when network sampling mode changes (all/none)parse_eventfactory updated with 2 new event types- Convenience handlers:
on_dom_content_loaded(),on_sampling_state_changed() - 3 new unit tests (total: 217)
[1.6.3] - 2025-07-04¶
Added¶
NetworkAuthRequiredEvent— dedicated Pydantic model for network.authRequired (previously only a handler)BrowsingContextFragmentNavigatedEvent— fires on fragment (#anchor) navigationBrowsingContextLoadEvent— fires when the page finishes loading (window load event)parse_eventfactory updated with 3 new event types- Convenience handlers:
on_fragment_navigated(),on_load() - 5 new unit tests (total: 214)
[1.6.2] - 2025-07-04¶
Added¶
NetworkModule.add_cache_override()/remove_cache_override()— cached response override for matching requestsNetworkDataReceivedEvent— fires when response body data arrives (streaming)BrowsingContextNavigationCompletedEvent— fires when navigation finishes (complete/canceled)parse_eventfactory updated with 2 new event types- Convenience handlers:
on_data_received(),on_navigation_completed() AddCacheOverrideResultresult model- 7 new unit tests (total: 209)
[1.6.1] - 2025-07-03¶
Added¶
NetworkResponseStartedEvent— fires when response headers are received (before body completes)ScriptRealmCreatedEvent— fires when a new realm is createdScriptRealmDestroyedEvent— fires when a realm is destroyedBrowsingContextUserPromptOpenedEvent— fires when a dialog (alert/confirm/prompt) opensparse_eventfactory updated to handle all new event types- Convenience handlers in
BiDiClient:on_response_started(),on_realm_created(),on_realm_destroyed(),on_user_prompt_opened() - 8 new unit tests (total: 202)
[1.6.0] - 2025-07-03¶
Added¶
PreloadModule—add_script()andremove_script()for injecting scripts before page loadEmulationModule—set_geolocation(),set_network_conditions(),set_timezone(),set_user_agent()for device environment emulationPermissionsModule—set_permission()for controlling browser permissions (geolocation, notifications, etc.)LogModule—clear()for clearing the log bufferBrowsingModule.get_viewport()— returnsViewportwith width, height, and device pixel ratioViewportandAddPreloadScriptResultresult models- 14 new unit tests (total: 194)
[1.5.1] - 2025-07-03¶
Changed¶
- Translated all Spanish documentation, docstrings, and comments to English across the entire codebase
[1.2.1] - 2025-07-03¶
Fixed¶
NameError: BrowsingContextinscript.pyandbrowsing.py—isinstancewith class underTYPE_CHECKINGNavigationvalidation error —contextnow optional (protocol does not always return it)RemoteValue.parsenow unwraps{type: "success", result: {...}}wrapper fromscript.evaluatescreenshot"invalid argument" — don't sendformatwhen it's the defaultpngwait_for_selectorrewritten withscript.evaluate(driver bug withcallFunctionand primitive args)wait_for_functionunwrapstype: "success"wrapper correctly- Integration tests migrated to EdgeDriver headless (does not affect user's Chrome)
- 23 integration tests passing, 118 unit tests passing
[1.2.0] - 2025-07-03¶
Added¶
InputModule— user input simulation (keyboard, mouse, scroll)perform_actions()— executes action sequences with virtual devicesrelease_actions()— cancels in-progress actionsset_files()— selects files on<input type="file">click()— click at coordinates (x, y) with configurable buttondouble_click()— double click at coordinatestype_text()— types text key by keypress_key()— presses and releases a keyscroll()— mouse wheel scroll (horizontal and vertical)drag_and_drop()— drag and drop between two pointsInputSource,KeyAction,PointerAction,WheelAction— typed models- 15 unit tests for InputModule
[1.1.0] - 2025-07-03¶
Added¶
NetworkModule— network request interception and monitoringadd_intercept()/remove_intercept()— block requests at specific phasescontinue_request()— continue an intercepted request with modificationscontinue_response()— continue an intercepted response with modificationsfail_request()— fail an intercepted requestprovide_response()— provide a synthetic response without making the actual request- Event models:
NetworkBeforeRequestSentEvent,NetworkResponseCompletedEvent,NetworkFetchErrorEvent BiDiClient.on_request(),on_response(),on_fetch_error()— convenience handlersNetworkRequestData,NetworkResponseData— typed protocol models- 20 unit tests for network module and event models
[1.0.1] - 2025-07-03¶
Fixed¶
- CI: lower coverage threshold from 90% to 80% (integration tests don't run in unit CI)
- CI: add
permissions: contents: writeto docs workflow for gh-pages deploy - CI: remove invalid
--browserflag from integration test commands - CI: mark integration tests as
continue-on-error(fixtures are Windows-specific)
[1.0.0] - 2025-07-03¶
Added¶
BiDiClientwithconnect(),close(), context manager (async with)SessionModule—new(),status(),subscribe(),unsubscribe()BrowsingModule—create_context(),navigate(),close(),screenshot(),get_tree(),wait_for_selector(),wait_for_function(),open()ScriptModule—evaluate(),call_function(),disown()EventDispatcher—on(),off(), decorator mode, error isolationPageobject — convenience layer withevaluate(),screenshot(),wait_for_selector(),wait_for_function(),close()RemoteValuewith subtypes:StringValue,NumberValue,BooleanValue,NullValue,UndefinedValue,BigIntValue,ObjectValue,ArrayValue,HandleValueCapabilities— detection fromsession.statusClientConfig— typed configuration with Pydantic- Reconnect with exponential backoff
- Exception hierarchy:
BiDiError,BiDiConnectionError,BiDiTimeoutError,CapabilityError,CommandError,InvalidArgumentError,NoSuchFrameError,JavaScriptError - Cross-browser: Chrome, Firefox, Edge
- Structured logging
- CI: GitHub Actions with matrix Chrome + Firefox, Python 3.11/3.12/3.13
- Coverage > 90%