{
  "format": 3,
  "id": "2.6",
  "title": "Concept map: what a click waits for after input",
  "layers": {
    "client": {
      "label": "Client"
    },
    "server": {
      "label": "Server"
    },
    "browser": {
      "label": "Browser"
    },
    "app": {
      "label": "App"
    }
  },
  "lanes": {
    "test": {
      "label": "NODE CLIENT · TEST & EVENTS",
      "layer": "client",
      "y": 16,
      "h": 522.4000000000001,
      "x": 16,
      "w": 619.7995
    },
    "server": {
      "label": "PLAYWRIGHT SERVER",
      "layer": "server",
      "y": 566.4000000000001,
      "h": 522.4000000000001,
      "x": 16,
      "w": 619.7995
    },
    "browser": {
      "label": "BROWSER",
      "layer": "browser",
      "y": 1116.8000000000002,
      "h": 409.8000000000002,
      "x": 16,
      "w": 619.7995
    },
    "app": {
      "label": "YOUR APP",
      "layer": "app",
      "y": 1554.6000000000004,
      "h": 72,
      "x": 16,
      "w": 619.7995
    }
  },
  "frames": {},
  "nodes": {
    "call": {
      "label": "locator.click()",
      "layer": "client",
      "lane": "test",
      "box": [
        157.5,
        40,
        109,
        36
      ]
    },
    "url": {
      "label": "waitForURL()",
      "layer": "client",
      "lane": "test",
      "box": [
        126.55249999999995,
        490.40000000000003,
        105,
        36
      ]
    },
    "subscribe": {
      "label": "subscribe before click",
      "layer": "client",
      "lane": "test",
      "box": [
        462.79949999999997,
        40,
        161,
        36
      ]
    },
    "barrier": {
      "label": "navigation barrier",
      "layer": "server",
      "lane": "server",
      "box": [
        237,
        590.4000000000001,
        137,
        36
      ]
    },
    "bypass": {
      "label": "noWaitAfter · no barrier",
      "layer": "server",
      "lane": "server",
      "box": [
        32,
        590.4000000000001,
        173,
        36
      ]
    },
    "returned": {
      "label": "click returns",
      "layer": "server",
      "lane": "server",
      "box": [
        378.1545,
        1040.8000000000002,
        102,
        36
      ]
    },
    "input": {
      "label": "mouse input",
      "layer": "browser",
      "lane": "browser",
      "box": [
        330.04949999999997,
        1140.8000000000002,
        103,
        36
      ]
    },
    "request": {
      "label": "top-frame request",
      "layer": "browser",
      "lane": "browser",
      "box": [
        312.54949999999997,
        1253.4,
        138,
        36
      ]
    },
    "commit": {
      "label": "navigation commits",
      "layer": "browser",
      "lane": "browser",
      "box": [
        307.54949999999997,
        1366.0000000000002,
        148,
        36
      ]
    },
    "load": {
      "label": "page load",
      "layer": "browser",
      "lane": "browser",
      "box": [
        196.29950000000002,
        1478.6000000000004,
        86,
        36
      ]
    },
    "iframe": {
      "label": "iframe navigation",
      "layer": "browser",
      "lane": "browser",
      "box": [
        161.95049999999998,
        1140.8000000000002,
        135,
        36
      ]
    },
    "app": {
      "label": "app fetches content",
      "layer": "app",
      "lane": "app",
      "box": [
        164.29950000000002,
        1578.6000000000004,
        150,
        36
      ]
    },
    "predicate": {
      "label": "event predicate",
      "layer": "client",
      "lane": "test",
      "box": [
        481.79949999999997,
        152.6,
        123,
        36
      ]
    },
    "accepted": {
      "label": "download accepted",
      "layer": "client",
      "lane": "test",
      "box": [
        470.29949999999997,
        265.2,
        146,
        36
      ]
    }
  },
  "edges": {
    "enable": {
      "from": "call",
      "to": "barrier",
      "label": {
        "at": [
          117.62893491784146,
          223.5820725201806
        ],
        "text": "waitAfter true"
      },
      "path": "M212,76 L212,333.20000000000005 L305.5,333.20000000000005 L305.5,590.4000000000001",
      "badge": [
        258.75,
        333.20000000000005
      ]
    },
    "skip": {
      "from": "call",
      "to": "bypass",
      "label": {
        "at": [
          130.469,
          208.8
        ],
        "text": "noWaitAfter"
      },
      "path": "M212,76 L212,333.20000000000005 L118.5,333.20000000000005 L118.5,590.4000000000001",
      "badge": [
        165.25,
        333.20000000000005
      ]
    },
    "input": {
      "from": "barrier",
      "to": "input",
      "label": {
        "at": [
          231.56812499999992,
          746.584375
        ],
        "text": "sends input"
      },
      "path": "M305.5,626.4000000000001 L305.5,883.6000000000001 L381.54949999999997,883.6000000000001 L381.54949999999997,1140.8000000000002",
      "badge": [
        343.52475,
        883.6000000000001
      ]
    },
    "request": {
      "from": "input",
      "to": "request",
      "label": {
        "at": [
          385.54949999999997,
          1200.875
        ],
        "text": "starts"
      },
      "path": "M381.54949999999997,1176.8000000000002 L381.54949999999997,1215.1000000000001 L381.54949999999997,1253.4",
      "badge": [
        381.54949999999997,
        1215.1000000000001
      ]
    },
    "commit": {
      "from": "request",
      "to": "commit",
      "label": {
        "at": [
          393.5495,
          1331.9000000000003
        ],
        "text": "commits"
      },
      "path": "M381.54949999999997,1289.4 L381.54949999999997,1327.7000000000003 L381.54949999999997,1366.0000000000002",
      "badge": [
        381.54949999999997,
        1327.7000000000003
      ]
    },
    "load": {
      "from": "commit",
      "to": "load",
      "label": {
        "at": [
          330.54949999999997,
          1444.5000000000002
        ],
        "text": "then loads"
      },
      "path": "M361.4074040852575,1402.0000000000002 L318.54949999999997,1440.3000000000002 L264.6369777975133,1478.6000000000004",
      "badge": [
        315.0218859354616,
        1442.8060526414324
      ]
    },
    "content": {
      "from": "load",
      "to": "app",
      "label": {
        "at": [
          164.08950000000004,
          1534.8000000000004
        ],
        "text": "after load"
      },
      "path": "M239.29950000000002,1514.6000000000004 L239.29950000000002,1546.6000000000004 L239.29950000000002,1546.6000000000004 L239.29950000000002,1578.6000000000004",
      "badge": [
        239.29950000000002,
        1546.6000000000004
      ]
    },
    "release": {
      "from": "commit",
      "to": "returned",
      "label": {
        "at": [
          386.15846373990973,
          1300.9614674589213
        ],
        "text": "releases hold"
      },
      "path": "M381.54949999999997,1366.0000000000002 L381.54949999999997,1221.4 L429.1545,1221.4 L429.1545,1076.8000000000002",
      "badge": [
        381.54949999999997,
        1237.4
      ]
    },
    "accept": {
      "from": "predicate",
      "to": "accepted",
      "label": {
        "at": [
          555.2995,
          231.1
        ],
        "text": "predicate passes"
      },
      "path": "M543.2995,188.6 L543.2995,226.9 L543.2995,265.2",
      "badge": [
        543.2995,
        226.89999999999998
      ]
    },
    "ignores": {
      "from": "barrier",
      "to": "iframe",
      "label": {
        "at": [
          184.48755439013547,
          763.7922011883812
        ],
        "text": "ignores child frame"
      },
      "dashed": true,
      "path": "M305.5,626.4000000000001 L305.5,883.6000000000001 L229.45049999999998,883.6000000000001 L229.45049999999998,1140.8000000000002",
      "badge": [
        267.47524999999996,
        883.6000000000001
      ]
    },
    "listens": {
      "from": "subscribe",
      "to": "predicate",
      "label": {
        "at": [
          555.2995000000001,
          118.5
        ],
        "text": "listens from call"
      },
      "dashed": true,
      "path": "M543.2995,76 L543.2995,114.3 L543.2995,152.6",
      "badge": [
        543.2995,
        114.3
      ]
    },
    "url_load": {
      "from": "url",
      "to": "load",
      "label": {
        "at": [
          78.55849999999998,
          768.6500000000002
        ],
        "text": "waits for load"
      },
      "dashed": true,
      "path": "M179.05249999999995,526.4000000000001 L179.05249999999995,1002.5000000000002 L239.29950000000002,1002.5000000000002 L239.29950000000002,1478.6000000000004",
      "badge": [
        209.17599999999993,
        1002.5000000000002
      ]
    }
  },
  "scenarios": [
    {
      "id": "how",
      "label": "What a click waits for",
      "display": {
        "counterLabel": false,
        "edges": "progressive",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "steps": [
        {
          "id": "checks-precede-the-mouse-input",
          "title": "Checks precede the mouse input",
          "text": "The click checks the element and sends mouse input.",
          "show": [
            "call",
            "input"
          ],
          "current": [
            "input"
          ],
          "edges": [],
          "defs": [
            "call",
            "input"
          ],
          "sources": [
            {
              "label": "dom.ts:431-440",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L431-L440"
            },
            {
              "label": "dom.ts:545-557",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L545-L557"
            },
            {
              "label": "dom.ts:482-506",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L482-L506"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "an-enabled-waitafter-creates-a-b",
          "title": "An enabled waitAfter creates a barrier",
          "text": "The barrier surrounds the action. Top-frame navigation requests register with it.",
          "show": [
            "barrier",
            "request"
          ],
          "current": [
            "barrier"
          ],
          "edges": [
            "enable",
            "input",
            "request"
          ],
          "defs": [
            "barrier",
            "request"
          ],
          "sources": [
            {
              "label": "dom.ts:482",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L482"
            },
            {
              "label": "frames.ts:192-207",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
            },
            {
              "label": "frames.ts:219-224",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L219-L224"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "commit-releases-the-navigation-h",
          "title": "Commit releases the navigation hold",
          "text": "The click returns after the navigation commits or fails; it does not wait for load.",
          "show": [
            "commit",
            "returned",
            "load"
          ],
          "current": [
            "commit",
            "returned"
          ],
          "edges": [
            "commit",
            "release",
            "load"
          ],
          "defs": [
            "commit",
            "returned",
            "load"
          ],
          "sources": [
            {
              "label": "frames.ts:267-269",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L267-L269"
            },
            {
              "label": "frames.ts:1892-1920",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1892-L1920"
            },
            {
              "label": "frames.ts:192-207",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
            },
            {
              "label": "dom.ts:506-520",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L506-L520"
            },
            {
              "label": "frame.ts:147-172",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/frame.ts#L147-L172"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "an-iframe-does-not-hold-the-clic",
          "title": "An iframe does not hold the click",
          "text": "The barrier ignores child-frame navigation. The iframe may commit and load later.",
          "show": [
            "iframe"
          ],
          "current": [
            "iframe"
          ],
          "edges": [
            "ignores"
          ],
          "defs": [
            "iframe"
          ],
          "code": "top",
          "sources": [
            {
              "label": "frames.ts:1892-1910",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1892-L1910"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "nowaitafter-skips-the-barrier",
          "title": "noWaitAfter skips the barrier",
          "text": "The checks still run. The wait log prints even when no barrier is created.",
          "show": [
            "bypass"
          ],
          "current": [
            "bypass"
          ],
          "edges": [
            "skip"
          ],
          "defs": [
            "bypass"
          ],
          "sources": [
            {
              "label": "dom.ts:545-557",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L545-L557"
            },
            {
              "label": "frames.ts:192-207",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
            },
            {
              "label": "dom.ts:431-440",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L431-L440"
            },
            {
              "label": "dom.ts:545-557",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L545-L557"
            },
            {
              "label": "frames.ts:192-207",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
            },
            {
              "label": "dom.ts:506-520",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L506-L520"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "wait-for-the-url-then-assert-con",
          "title": "Wait for the URL, then assert content",
          "text": "waitForURL defaults to load. The app can still fetch data afterwards.",
          "show": [
            "url",
            "app"
          ],
          "current": [
            "url",
            "app"
          ],
          "edges": [
            "content",
            "url_load"
          ],
          "defs": [
            "url",
            "app"
          ],
          "code": "after",
          "sources": [
            {
              "label": "frame.ts:199-205",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/frame.ts#L199-L205"
            },
            {
              "label": "frame.ts:147-172",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/frame.ts#L147-L172"
            },
            {
              "label": "navigations.md:57-60",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/docs/src/navigations.md#L57-L60"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "subscribe-before-the-trigger",
          "title": "Subscribe before the trigger",
          "text": "waitForEvent starts listening when called. It cannot catch an event Playwright already sent to the test’s listeners.",
          "show": [
            "subscribe"
          ],
          "current": [
            "subscribe"
          ],
          "edges": [
            "listens"
          ],
          "defs": [
            "subscribe"
          ],
          "code": "download",
          "sources": [
            {
              "label": "class-page.md:4873-4878",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/docs/src/api/class-page.md#L4873-L4878"
            },
            {
              "label": "waiter.ts:144-163",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/waiter.ts#L144-L163"
            },
            {
              "label": "eventEmitter.ts:64-107",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/eventEmitter.ts#L64-L107"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "the-predicate-accepts-an-event",
          "title": "The predicate accepts an event",
          "text": "A false predicate keeps listening. Acceptance removes the listener and resolves; timeout, close or crash can reject the wait.",
          "show": [
            "predicate",
            "accepted"
          ],
          "current": [
            "accepted"
          ],
          "edges": [
            "accept"
          ],
          "defs": [
            "predicate",
            "accepted"
          ],
          "code": "predicate",
          "sources": [
            {
              "label": "waiter.ts:144-163",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/waiter.ts#L144-L163"
            },
            {
              "label": "page.ts:510-523",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/page.ts#L510-L523"
            },
            {
              "label": "waiter.ts:144-163",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/waiter.ts#L144-L163"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        }
      ]
    },
    {
      "id": "link",
      "label": "Link",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "whole": {
        "title": "A link opens the next page",
        "text": "The click waits for the commit, not for load."
      },
      "steps": [
        {
          "id": "the-click-checks-the-element-and",
          "title": "The click checks the element and sends the mouse input.",
          "text": "The click checks the element and sends the mouse input.",
          "show": [
            "call",
            "url",
            "subscribe",
            "barrier",
            "bypass",
            "returned",
            "input",
            "request",
            "commit",
            "load",
            "iframe",
            "app",
            "predicate",
            "accepted"
          ],
          "current": [
            "input"
          ],
          "edges": [
            "input"
          ],
          "defs": [],
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action"
          ],
          "sources": [
            {
              "label": "dom.ts:482-506",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L482-L506"
            },
            {
              "label": "dom.ts:482",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L482"
            },
            {
              "label": "frames.ts:192-207",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
            },
            {
              "label": "frames.ts:219-224",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L219-L224"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "the-link-starts-a-navigation-the",
          "title": "The link starts a navigation. The click waits for it.",
          "text": "The link starts a navigation. The click waits for it.",
          "show": [
            "call",
            "url",
            "subscribe",
            "barrier",
            "bypass",
            "returned",
            "input",
            "request",
            "commit",
            "load",
            "iframe",
            "app",
            "predicate",
            "accepted"
          ],
          "current": [
            "request"
          ],
          "edges": [
            "request"
          ],
          "defs": [],
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action",
            "  click action done",
            "  waiting for scheduled navigations to finish"
          ],
          "sources": [
            {
              "label": "dom.ts:482",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L482"
            },
            {
              "label": "frames.ts:192-207",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
            },
            {
              "label": "frames.ts:219-224",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L219-L224"
            },
            {
              "label": "frames.ts:1892-1910",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1892-L1910"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "the-navigation-commits-the-click",
          "title": "The navigation commits. The click returns while the page loads.",
          "text": "The navigation commits. The click returns while the page loads.",
          "show": [
            "call",
            "url",
            "subscribe",
            "barrier",
            "bypass",
            "returned",
            "input",
            "request",
            "commit",
            "load",
            "iframe",
            "app",
            "predicate",
            "accepted"
          ],
          "current": [
            "returned"
          ],
          "edges": [
            "commit",
            "release"
          ],
          "defs": [],
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action",
            "  click action done",
            "  waiting for scheduled navigations to finish",
            "  navigated to \"https://shop.test/done\"",
            "  navigations have finished"
          ],
          "sources": [
            {
              "label": "frames.ts:267-269",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L267-L269"
            },
            {
              "label": "frames.ts:1892-1920",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1892-L1920"
            },
            {
              "label": "frames.ts:192-207",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
            },
            {
              "label": "dom.ts:506-520",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L506-L520"
            },
            {
              "label": "frame.ts:147-172",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/frame.ts#L147-L172"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "waitforurl-sees-the-url-then-wai",
          "title": "waitForURL sees the URL, then waits for load.",
          "text": "waitForURL sees the URL, then waits for load.",
          "show": [
            "call",
            "url",
            "subscribe",
            "barrier",
            "bypass",
            "returned",
            "input",
            "request",
            "commit",
            "load",
            "iframe",
            "app",
            "predicate",
            "accepted"
          ],
          "current": [
            "url"
          ],
          "edges": [],
          "defs": [],
          "code": "after",
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action",
            "  click action done",
            "  waiting for scheduled navigations to finish",
            "  navigated to \"https://shop.test/done\"",
            "  navigations have finished"
          ],
          "sources": [
            {
              "label": "frame.ts:199-205",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/frame.ts#L199-L205"
            },
            {
              "label": "frame.ts:147-172",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/frame.ts#L147-L172"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "after-load-the-app-can-still-fet",
          "title": "After load, the app can still fetch data. Assert the content.",
          "text": "After load, the app can still fetch data. Assert the content.",
          "show": [
            "call",
            "url",
            "subscribe",
            "barrier",
            "bypass",
            "returned",
            "input",
            "request",
            "commit",
            "load",
            "iframe",
            "app",
            "predicate",
            "accepted"
          ],
          "current": [
            "app"
          ],
          "edges": [],
          "defs": [],
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action",
            "  click action done",
            "  waiting for scheduled navigations to finish",
            "  navigated to \"https://shop.test/done\"",
            "  navigations have finished"
          ],
          "sources": [
            {
              "label": "navigations.md:57-60",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/docs/src/navigations.md#L57-L60"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "barrier",
          "step": "the-click-checks-the-element-and",
          "log": []
        },
        {
          "node": "input",
          "step": "the-click-checks-the-element-and",
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action"
          ],
          "edge": "input"
        },
        {
          "node": "request",
          "step": "the-link-starts-a-navigation-the",
          "log": [
            "  click action done",
            "  waiting for scheduled navigations to finish"
          ],
          "edge": "request"
        },
        {
          "node": "commit",
          "step": "the-navigation-commits-the-click",
          "log": [],
          "edge": "commit"
        },
        {
          "node": "returned",
          "step": "the-navigation-commits-the-click",
          "log": [
            "  navigated to \"https://shop.test/done\"",
            "  navigations have finished"
          ],
          "edge": "release"
        },
        {
          "node": "url",
          "step": "waitforurl-sees-the-url-then-wai",
          "log": []
        },
        {
          "node": "app",
          "step": "after-load-the-app-can-still-fet",
          "log": []
        }
      ]
    },
    {
      "id": "iframe",
      "label": "Iframe",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "whole": {
        "title": "The link is inside an iframe",
        "text": "Only top-frame navigations hold the click."
      },
      "steps": [
        {
          "id": "the-click-sends-the-mouse-input",
          "title": "The click sends the mouse input to a link in an iframe.",
          "text": "The click sends the mouse input to a link in an iframe.",
          "show": [
            "call",
            "url",
            "subscribe",
            "barrier",
            "bypass",
            "returned",
            "input",
            "request",
            "commit",
            "load",
            "iframe",
            "app",
            "predicate",
            "accepted"
          ],
          "current": [
            "input"
          ],
          "edges": [
            "input"
          ],
          "defs": [],
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action"
          ],
          "sources": [
            {
              "label": "dom.ts:482-506",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L482-L506"
            },
            {
              "label": "dom.ts:482",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L482"
            },
            {
              "label": "frames.ts:192-207",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
            },
            {
              "label": "frames.ts:219-224",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L219-L224"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "the-iframe-navigation-is-not-cou",
          "title": "The iframe navigation is not counted. The click returns.",
          "text": "The iframe navigation is not counted. The click returns.",
          "show": [
            "call",
            "url",
            "subscribe",
            "barrier",
            "bypass",
            "returned",
            "input",
            "request",
            "commit",
            "load",
            "iframe",
            "app",
            "predicate",
            "accepted"
          ],
          "current": [
            "returned"
          ],
          "edges": [],
          "defs": [],
          "code": "top",
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action",
            "  click action done",
            "  waiting for scheduled navigations to finish",
            "  navigations have finished"
          ],
          "sources": [
            {
              "label": "frames.ts:192-207",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
            },
            {
              "label": "dom.ts:506-520",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L506-L520"
            },
            {
              "label": "frames.ts:1892-1910",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1892-L1910"
            },
            {
              "label": "dom.ts:482",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L482"
            },
            {
              "label": "frames.ts:192-207",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
            },
            {
              "label": "frames.ts:219-224",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L219-L224"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "the-iframe-commits-and-loads-lat",
          "title": "The iframe commits and loads later, without the click.",
          "text": "The iframe commits and loads later, without the click.",
          "show": [
            "call",
            "url",
            "subscribe",
            "barrier",
            "bypass",
            "returned",
            "input",
            "request",
            "commit",
            "load",
            "iframe",
            "app",
            "predicate",
            "accepted"
          ],
          "current": [
            "iframe"
          ],
          "edges": [],
          "defs": [],
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action",
            "  click action done",
            "  waiting for scheduled navigations to finish",
            "  navigations have finished"
          ],
          "sources": [
            {
              "label": "frames.ts:1892-1910",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1892-L1910"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "barrier",
          "step": "the-click-sends-the-mouse-input",
          "log": []
        },
        {
          "node": "input",
          "step": "the-click-sends-the-mouse-input",
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action"
          ],
          "edge": "input"
        },
        {
          "node": "barrier",
          "step": "the-iframe-navigation-is-not-cou",
          "log": []
        },
        {
          "node": "returned",
          "step": "the-iframe-navigation-is-not-cou",
          "log": [
            "  click action done",
            "  waiting for scheduled navigations to finish",
            "  navigations have finished"
          ]
        },
        {
          "node": "iframe",
          "step": "the-iframe-commits-and-loads-lat",
          "log": []
        }
      ]
    },
    {
      "id": "nowaitafter",
      "label": "noWaitAfter",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "whole": {
        "title": "click({ noWaitAfter: true })",
        "text": "The click does not wait. The log looks the same."
      },
      "steps": [
        {
          "id": "the-checks-still-run-the-click-w",
          "title": "The checks still run. The click will not wait after the input.",
          "text": "The checks still run. The click will not wait after the input.",
          "show": [
            "call",
            "url",
            "subscribe",
            "barrier",
            "bypass",
            "returned",
            "input",
            "request",
            "commit",
            "load",
            "iframe",
            "app",
            "predicate",
            "accepted"
          ],
          "current": [
            "bypass"
          ],
          "edges": [],
          "defs": [],
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action"
          ],
          "sources": [
            {
              "label": "dom.ts:545-557",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L545-L557"
            },
            {
              "label": "frames.ts:192-207",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
            },
            {
              "label": "dom.ts:431-440",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L431-L440"
            },
            {
              "label": "dom.ts:545-557",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L545-L557"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "the-click-returns-at-once-the-lo",
          "title": "The click returns at once. The log prints the same lines.",
          "text": "The click returns at once. The log prints the same lines.",
          "show": [
            "call",
            "url",
            "subscribe",
            "barrier",
            "bypass",
            "returned",
            "input",
            "request",
            "commit",
            "load",
            "iframe",
            "app",
            "predicate",
            "accepted"
          ],
          "current": [
            "returned"
          ],
          "edges": [],
          "defs": [],
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action",
            "  click action done",
            "  waiting for scheduled navigations to finish",
            "  navigations have finished"
          ],
          "sources": [
            {
              "label": "frames.ts:192-207",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
            },
            {
              "label": "dom.ts:506-520",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L506-L520"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "the-navigation-commits-and-loads",
          "title": "The navigation commits and loads on its own.",
          "text": "The navigation commits and loads on its own.",
          "show": [
            "call",
            "url",
            "subscribe",
            "barrier",
            "bypass",
            "returned",
            "input",
            "request",
            "commit",
            "load",
            "iframe",
            "app",
            "predicate",
            "accepted"
          ],
          "current": [
            "load"
          ],
          "edges": [
            "commit",
            "load"
          ],
          "defs": [],
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action",
            "  click action done",
            "  waiting for scheduled navigations to finish",
            "  navigations have finished"
          ],
          "sources": [
            {
              "label": "frames.ts:219-224",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L219-L224"
            },
            {
              "label": "frames.ts:1892-1910",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1892-L1910"
            },
            {
              "label": "frames.ts:267-269",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L267-L269"
            },
            {
              "label": "frames.ts:1892-1920",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1892-L1920"
            },
            {
              "label": "frame.ts:147-172",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/frame.ts#L147-L172"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "bypass",
          "step": "the-checks-still-run-the-click-w",
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action"
          ]
        },
        {
          "node": "returned",
          "step": "the-click-returns-at-once-the-lo",
          "log": [
            "  click action done",
            "  waiting for scheduled navigations to finish",
            "  navigations have finished"
          ]
        },
        {
          "node": "request",
          "step": "the-navigation-commits-and-loads",
          "log": []
        },
        {
          "node": "commit",
          "step": "the-navigation-commits-and-loads",
          "log": [],
          "edge": "commit"
        },
        {
          "node": "load",
          "step": "the-navigation-commits-and-loads",
          "log": [],
          "edge": "load"
        }
      ]
    },
    {
      "id": "download",
      "label": "Download",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "whole": {
        "title": "Wait for an event before the trigger",
        "text": "waitForEvent listens from the moment you call it."
      },
      "steps": [
        {
          "id": "the-test-starts-to-wait-for-the",
          "title": "The test starts to wait for the download. No await yet.",
          "text": "The test starts to wait for the download. No await yet.",
          "show": [
            "call",
            "url",
            "subscribe",
            "barrier",
            "bypass",
            "returned",
            "input",
            "request",
            "commit",
            "load",
            "iframe",
            "app",
            "predicate",
            "accepted"
          ],
          "current": [
            "subscribe"
          ],
          "edges": [],
          "defs": [],
          "code": "download",
          "log": [],
          "sources": [
            {
              "label": "class-page.md:4873-4878",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/docs/src/api/class-page.md#L4873-L4878"
            },
            {
              "label": "waiter.ts:144-163",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/waiter.ts#L144-L163"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "the-click-runs-and-returns",
          "title": "The click runs and returns.",
          "text": "The click runs and returns.",
          "show": [
            "call",
            "url",
            "subscribe",
            "barrier",
            "bypass",
            "returned",
            "input",
            "request",
            "commit",
            "load",
            "iframe",
            "app",
            "predicate",
            "accepted"
          ],
          "current": [
            "returned"
          ],
          "edges": [
            "input"
          ],
          "defs": [],
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action",
            "  click action done",
            "  waiting for scheduled navigations to finish",
            "  navigations have finished"
          ],
          "sources": [
            {
              "label": "dom.ts:482-506",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L482-L506"
            },
            {
              "label": "frames.ts:192-207",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
            },
            {
              "label": "dom.ts:506-520",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L506-L520"
            },
            {
              "label": "dom.ts:482",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L482"
            },
            {
              "label": "frames.ts:192-207",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
            },
            {
              "label": "frames.ts:219-224",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L219-L224"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        },
        {
          "id": "the-download-event-passes-the-fi",
          "title": "The download event passes the filter. waitForEvent returns it.",
          "text": "The download event passes the filter. waitForEvent returns it.",
          "show": [
            "call",
            "url",
            "subscribe",
            "barrier",
            "bypass",
            "returned",
            "input",
            "request",
            "commit",
            "load",
            "iframe",
            "app",
            "predicate",
            "accepted"
          ],
          "current": [
            "accepted"
          ],
          "edges": [
            "accept"
          ],
          "defs": [],
          "code": "predicate",
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action",
            "  click action done",
            "  waiting for scheduled navigations to finish",
            "  navigations have finished"
          ],
          "sources": [
            {
              "label": "waiter.ts:144-163",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/waiter.ts#L144-L163"
            },
            {
              "label": "page.ts:510-523",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/page.ts#L510-L523"
            }
          ],
          "deeper": [
            {
              "title": "2.1 Two loops behind every click",
              "href": "/2-actions/2-1-two-loops/"
            },
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "subscribe",
          "step": "the-test-starts-to-wait-for-the",
          "log": []
        },
        {
          "node": "barrier",
          "step": "the-click-runs-and-returns",
          "log": []
        },
        {
          "node": "input",
          "step": "the-click-runs-and-returns",
          "log": [],
          "edge": "input"
        },
        {
          "node": "returned",
          "step": "the-click-runs-and-returns",
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  performing click action",
            "  click action done",
            "  waiting for scheduled navigations to finish",
            "  navigations have finished"
          ]
        },
        {
          "node": "predicate",
          "step": "the-download-event-passes-the-fi",
          "log": []
        },
        {
          "node": "accepted",
          "step": "the-download-event-passes-the-fi",
          "log": [],
          "edge": "accept"
        }
      ]
    }
  ],
  "definitions": {
    "call": {
      "term": "locator.click()",
      "text": "Checks run before the mouse input."
    },
    "url": {
      "term": "waitForURL()",
      "text": "Waits for the URL and, by default, load."
    },
    "subscribe": {
      "term": "subscribe before click",
      "text": "Start the event wait before its trigger."
    },
    "barrier": {
      "term": "navigation barrier",
      "text": "Enabled waitAfter creates the signal barrier around input."
    },
    "bypass": {
      "term": "noWaitAfter · no barrier",
      "text": "Disabling waitAfter runs the action without creating a barrier."
    },
    "returned": {
      "term": "click returns",
      "text": "The enabled barrier settles before the click returns."
    },
    "input": {
      "term": "mouse input",
      "text": "The pointer action performs the mouse input."
    },
    "request": {
      "term": "top-frame request",
      "text": "Navigation requests register with active barriers."
    },
    "commit": {
      "term": "navigation commits",
      "text": "A public navigation event releases the navigation hold."
    },
    "load": {
      "term": "page load",
      "text": "Load is a separate lifecycle state from navigation."
    },
    "iframe": {
      "term": "iframe navigation",
      "text": "Child-frame navigation does not hold the click."
    },
    "app": {
      "term": "app fetches content",
      "text": "Pages can fetch data and populate UI after load."
    },
    "predicate": {
      "term": "event predicate",
      "text": "False predicates keep listening for another event."
    },
    "accepted": {
      "term": "download accepted",
      "text": "The first accepted event removes the listener and resolves."
    }
  },
  "code": {
    "top": {
      "title": "Inside Playwright · frames.ts",
      "source": {
        "label": "frames.ts:1892-1910",
        "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1892-L1910"
      },
      "lines": [
        "    // Auto-wait top-level navigations only.",
        "    if (frame.parentFrame())",
        "      return;",
        "    this.retain();"
      ]
    },
    "after": {
      "title": "In your test · after the click",
      "lines": [
        "await next.click();",
        "// ✗ The new page may not show it yet",
        "const title = await heading.textContent();",
        "// ✓ Wait for the URL, then assert",
        "await page.waitForURL('**/done');",
        "await expect(heading).toHaveText('Done');"
      ]
    },
    "predicate": {
      "title": "Inside Playwright · waiter.ts",
      "source": {
        "label": "waiter.ts:144-163",
        "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/waiter.ts#L144-L163"
      },
      "lines": [
        "          if (predicate && !(await predicate(eventArg)))",
        "            return;",
        "          emitter.removeListener(event, listener);",
        "          resolve(eventArg);"
      ]
    },
    "download": {
      "title": "In your test · download event",
      "lines": [
        "// ✗ Subscribe after the trigger",
        "await exportFile.click();",
        "await page.waitForEvent('download');",
        "",
        "// ✓ Subscribe before the trigger",
        "const file = page.waitForEvent('download');",
        "await exportFile.click();",
        "const download = await file;"
      ]
    }
  },
  "conceptScenario": "how",
  "concepts": [
    {
      "label": "YOUR TEST",
      "layer": "client",
      "items": [
        {
          "definition": "call",
          "short": "Checks run before the mouse input.",
          "nodes": [
            "call"
          ],
          "step": {
            "step": "checks-precede-the-mouse-input"
          },
          "source": {
            "label": "dom.ts:431-440",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L431-L440"
          }
        },
        {
          "definition": "url",
          "short": "Waits for the URL and, by default, load.",
          "nodes": [
            "url"
          ],
          "step": {
            "step": "wait-for-the-url-then-assert-con"
          },
          "source": {
            "label": "frame.ts:147-172",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/frame.ts#L147-L172"
          }
        },
        {
          "definition": "subscribe",
          "short": "Start the event wait before its trigger.",
          "nodes": [
            "subscribe"
          ],
          "step": {
            "step": "subscribe-before-the-trigger"
          },
          "source": {
            "label": "class-page.md:4873-4878",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/docs/src/api/class-page.md#L4873-L4878"
          }
        }
      ]
    },
    {
      "label": "PLAYWRIGHT SERVER",
      "layer": "server",
      "items": [
        {
          "definition": "barrier",
          "short": "Enabled waitAfter creates the signal barrier around input.",
          "nodes": [
            "barrier"
          ],
          "step": {
            "step": "an-enabled-waitafter-creates-a-b"
          },
          "source": {
            "label": "frames.ts:192-207",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
          }
        },
        {
          "definition": "bypass",
          "short": "Disabling waitAfter runs the action without creating a barrier.",
          "nodes": [
            "bypass"
          ],
          "step": {
            "step": "nowaitafter-skips-the-barrier"
          },
          "source": {
            "label": "frames.ts:192-196",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L196"
          }
        },
        {
          "definition": "returned",
          "short": "The enabled barrier settles before the click returns.",
          "nodes": [
            "returned"
          ],
          "step": {
            "step": "commit-releases-the-navigation-h"
          },
          "source": {
            "label": "frames.ts:192-207",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L192-L207"
          }
        }
      ]
    },
    {
      "label": "BROWSER",
      "layer": "browser",
      "items": [
        {
          "definition": "input",
          "short": "The pointer action performs the mouse input.",
          "nodes": [
            "input"
          ],
          "step": {
            "step": "checks-precede-the-mouse-input"
          },
          "source": {
            "label": "dom.ts:482-506",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L482-L506"
          }
        },
        {
          "definition": "request",
          "short": "Navigation requests register with active barriers.",
          "nodes": [
            "request"
          ],
          "step": {
            "step": "an-enabled-waitafter-creates-a-b"
          },
          "source": {
            "label": "frames.ts:219-224",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L219-L224"
          }
        },
        {
          "definition": "commit",
          "short": "A public navigation event releases the navigation hold.",
          "nodes": [
            "commit"
          ],
          "step": {
            "step": "commit-releases-the-navigation-h"
          },
          "source": {
            "label": "frames.ts:1892-1910",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1892-L1910"
          }
        },
        {
          "definition": "load",
          "short": "Load is a separate lifecycle state from navigation.",
          "nodes": [
            "load"
          ],
          "step": {
            "step": "commit-releases-the-navigation-h"
          },
          "source": {
            "label": "frame.ts:147-172",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/frame.ts#L147-L172"
          }
        },
        {
          "definition": "iframe",
          "short": "Child-frame navigation does not hold the click.",
          "nodes": [
            "iframe"
          ],
          "step": {
            "step": "an-iframe-does-not-hold-the-clic"
          },
          "source": {
            "label": "frames.ts:1892-1910",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1892-L1910"
          }
        }
      ]
    },
    {
      "label": "YOUR APP",
      "layer": "app",
      "items": [
        {
          "definition": "app",
          "short": "Pages can fetch data and populate UI after load.",
          "nodes": [
            "app"
          ],
          "step": {
            "step": "wait-for-the-url-then-assert-con"
          },
          "source": {
            "label": "navigations.md:57-60",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/docs/src/navigations.md#L57-L60"
          }
        }
      ]
    },
    {
      "label": "CLIENT · PAGE EVENTS",
      "layer": "client",
      "items": [
        {
          "definition": "predicate",
          "short": "False predicates keep listening for another event.",
          "nodes": [
            "predicate"
          ],
          "step": {
            "step": "the-predicate-accepts-an-event"
          },
          "source": {
            "label": "waiter.ts:144-163",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/waiter.ts#L144-L163"
          }
        },
        {
          "definition": "accepted",
          "short": "The first accepted event removes the listener and resolves.",
          "nodes": [
            "accepted"
          ],
          "step": {
            "step": "the-predicate-accepts-an-event"
          },
          "source": {
            "label": "waiter.ts:144-163",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/waiter.ts#L144-L163"
          }
        }
      ]
    }
  ],
  "callouts": {
    "1": [
      "barrier",
      "request",
      "commit",
      "iframe"
    ],
    "2": [
      "bypass",
      "returned"
    ],
    "3": [
      "url",
      "load",
      "app"
    ],
    "4": [
      "subscribe",
      "predicate",
      "accepted"
    ]
  },
  "deeper": [
    {
      "title": "2.1 Two loops behind every click",
      "href": "/2-actions/2-1-two-loops/",
      "why": "Checks and input before the navigation wait."
    },
    {
      "title": "2.5 Force skips safeguards, but still needs a click point",
      "href": "/2-actions/2-5-what-force-skips/",
      "why": "Force and noWaitAfter control different safeguards."
    },
    {
      "title": "4.6 Each clock spends its own remaining budget",
      "href": "/4-runner/4-6-timeouts/",
      "why": "The clocks that bound waits."
    }
  ],
  "viewBox": [
    678.7565000000001,
    1642.6000000000004
  ],
  "measurement": {
    "name": "font-table",
    "labels": {
      "enable": {
        "width": 88.49399999999999,
        "height": 12.6
      },
      "skip": {
        "width": 69.53099999999999,
        "height": 12.6
      },
      "input": {
        "width": 69.53099999999999,
        "height": 12.6
      },
      "request": {
        "width": 37.925999999999995,
        "height": 12.6
      },
      "commit": {
        "width": 44.24699999999999,
        "height": 12.6
      },
      "load": {
        "width": 63.20999999999999,
        "height": 12.6
      },
      "content": {
        "width": 63.20999999999999,
        "height": 12.6
      },
      "release": {
        "width": 82.17299999999999,
        "height": 12.6
      },
      "accept": {
        "width": 101.13599999999998,
        "height": 12.6
      },
      "ignores": {
        "width": 120.09899999999998,
        "height": 12.6
      },
      "listens": {
        "width": 107.45699999999998,
        "height": 12.6
      },
      "url_load": {
        "width": 88.49399999999999,
        "height": 12.6
      }
    }
  }
}
