Skip to content

[docs] decision: navigation is awaited with expect_navigation / wait_for_url / wait_for_load_state#17676

Open
AutomatedTester wants to merge 1 commit into
trunkfrom
adr-bidi-navigation-waiting
Open

[docs] decision: navigation is awaited with expect_navigation / wait_for_url / wait_for_load_state#17676
AutomatedTester wants to merge 1 commit into
trunkfrom
adr-bidi-navigation-waiting

Conversation

@AutomatedTester

Copy link
Copy Markdown
Member

💥 What does this PR do?

Proposes a design decision record: navigation is awaited with expect_navigation / wait_for_url / wait_for_load_state.

A click that triggers navigation is a top source of flaky tests: act-then-wait races because the navigation can complete between the two steps. BiDi emits the full navigation lifecycle (navigationStarted/navigationCommitted/domContentLoaded/load/navigationFailed/…), and with the expect_* primitive (record 0001, #17671) these become race-free waits. This record proposes the established Playwright-shaped trio: expect_navigation() (arm-before-action), wait_for_url(), and wait_for_load_state() with a shared commit/domcontentloaded/load vocabulary, consistent across bindings.

🔧 Implementation Notes

🤖 AI assistance

  • AI assisted (complete below)
    • Tool(s): Claude Code
    • What was generated: Initial draft of the decision record, derived from a CDDL-validated comparison of the Python BiDi surface against Playwright; revised through discussion and review
    • I reviewed all AI output and can explain the change

💡 Additional Considerations

One of a set of BiDi ergonomics decision records proposed together. Cross-binding convergence is tracked in the binding-status table.

🔄 Types of changes

  • Documentation (design decision record)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant