Skip to content

Python adapter: capture only for commands that can change the page #562

Closed

Description

@vishnuv688

Problem

The JavaScript adapters take a per-action capture only for commands that can change the page; reads, waits, lookups and assertions reuse the last capture. The Python adapter captures on every wire command, reads included.

Measured in #516 (v11.2.0): on the Android Clock flow, 42 captures (21 findElements, 9 getElementText, 4 isElementEnabled, ...) where WebdriverIO takes 8 for the same flow; capture is 44% of wall time. On desktop Chrome, 26 of 42 captures were findElement, isDisplayed and getCurrentUrl.

Proposal

Apply the same rule in the Python adapter (mirror the JS classification, with a mirror-vectors.json section so both sides agree). It is lossless: those rows show the capture of the last command that took one, exactly as on the JS adapters. Expected saving about 5.7 s of a 22 s Android run.

Re-measure with DEVTOOLS_CAPTURE_TIMING=1; update the docs that describe which actions capture the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions