{
  "format": 3,
  "id": "2.1",
  "title": "Concept map of locator.click(): the outer and the inner loop",
  "layers": {
    "client": {
      "label": "Client"
    },
    "server": {
      "label": "Server"
    },
    "browser": {
      "label": "Browser"
    },
    "fail": {
      "label": "Fail"
    },
    "page": {
      "label": "Page"
    }
  },
  "lanes": {
    "test": {
      "label": "YOUR TEST",
      "layer": "client",
      "y": 16,
      "h": 72,
      "x": 16,
      "w": 891.3333333333333
    },
    "server": {
      "label": "PLAYWRIGHT SERVER",
      "layer": "server",
      "y": 116,
      "h": 870,
      "x": 16,
      "w": 891.3333333333333
    },
    "browser": {
      "label": "BROWSER",
      "layer": "browser",
      "y": 1014,
      "h": 72,
      "x": 16,
      "w": 891.3333333333333
    }
  },
  "frames": {
    "outer": {
      "label": "OUTER LOOP · FIND THE ELEMENT",
      "showWith": [
        "resolve"
      ],
      "box": [
        541.1666666666666,
        340,
        226,
        90
      ]
    },
    "inner": {
      "label": "INNER LOOP · TRY THIS ELEMENT",
      "showWith": [
        "stable"
      ],
      "box": [
        453.5,
        896,
        225.5789999999999,
        90
      ]
    }
  },
  "nodes": {
    "call": {
      "label": "locator.click()",
      "layer": "client",
      "lane": "test",
      "mono": true,
      "box": [
        619.3333333333333,
        40,
        137,
        36
      ]
    },
    "timeout": {
      "label": "{ timeout }",
      "layer": "client",
      "lane": "test",
      "mono": true,
      "box": [
        788.3333333333333,
        40,
        107,
        36
      ]
    },
    "resolve": {
      "label": "resolve the locator",
      "layer": "server",
      "lane": "server",
      "tag": "selector engines · in page",
      "box": [
        553.1666666666666,
        368,
        202,
        50
      ]
    },
    "strict": {
      "label": "strict mode violation",
      "layer": "fail",
      "lane": "server",
      "tag": "2+ matches · fails now",
      "fail": true,
      "box": [
        533,
        482,
        175,
        50
      ]
    },
    "stable": {
      "label": "stable",
      "layer": "page",
      "lane": "server",
      "tag": "box per frame",
      "box": [
        465.5,
        924,
        113,
        50
      ]
    },
    "visible": {
      "label": "visible",
      "layer": "page",
      "lane": "server",
      "tag": "in page",
      "box": [
        176.33333333333334,
        140,
        72,
        50
      ]
    },
    "enabled": {
      "label": "enabled",
      "layer": "page",
      "lane": "server",
      "tag": "in page",
      "box": [
        156.83333333333334,
        254,
        75,
        50
      ]
    },
    "scroll": {
      "label": "scroll",
      "layer": "server",
      "lane": "server",
      "tag": "into view",
      "box": [
        151.33333333333334,
        482,
        86,
        50
      ]
    },
    "hit": {
      "label": "hit target",
      "layer": "page",
      "lane": "server",
      "tag": "element at point",
      "box": [
        127.33333333333334,
        596,
        134,
        50
      ]
    },
    "click": {
      "label": "click",
      "layer": "server",
      "lane": "server",
      "tag": "send mouse events",
      "box": [
        101.5,
        710,
        141,
        50
      ]
    },
    "retry": {
      "label": "retry this element · wait 0, 20, 100, 100, 500 ms",
      "layer": "server",
      "lane": "server",
      "custom": true,
      "box": [
        183,
        824,
        329,
        36
      ]
    },
    "mouse": {
      "label": "mouse move · down · up at the click point",
      "layer": "browser",
      "lane": "browser",
      "box": [
        28,
        1038,
        288,
        36
      ]
    },
    "inert": {
      "label": "not inert",
      "layer": "page",
      "lane": "server",
      "tag": "in page",
      "box": [
        155.33333333333334,
        368,
        78,
        50
      ]
    }
  },
  "edges": {
    "call_resolve": {
      "from": "call",
      "to": "resolve",
      "path": "M687.8333333333333,76 L687.8333333333333,368",
      "badge": [
        687.8333333333333,
        222
      ]
    },
    "resolve_strict": {
      "from": "resolve",
      "to": "strict",
      "path": "M620.5,418 L620.5,482",
      "badge": [
        620.5,
        450
      ]
    },
    "resolve_inner": {
      "from": "resolve",
      "to": "stable",
      "label": {
        "at": [
          721,
          625.2
        ],
        "text": "1 match"
      },
      "path": "M687.8333333333333,418 L687.8333333333333,428 L718,428 L718,870 L550.25,870 L550.25,924",
      "badge": [
        718,
        739.7916666666666
      ]
    },
    "detached": {
      "from": "visible",
      "to": "resolve",
      "label": {
        "at": [
          567.932,
          283.2
        ],
        "text": "detached"
      },
      "dashed": true,
      "path": "M230.33333333333334,190 L230.33333333333334,200 L620.5,200 L620.5,368",
      "badge": [
        504.41666666666663,
        200
      ]
    },
    "stable_visible": {
      "from": "stable",
      "to": "visible",
      "path": "M522,924 L522,210 L212.33333333333334,210 L212.33333333333334,190",
      "badge": [
        522,
        402.16666666666674
      ]
    },
    "visible_enabled": {
      "from": "visible",
      "to": "enabled",
      "path": "M194.33333333333334,190 L194.33333333333334,254",
      "badge": [
        194.33333333333334,
        222
      ]
    },
    "scroll_hit": {
      "from": "scroll",
      "to": "hit",
      "path": "M194.33333333333334,532 L194.33333333333334,596",
      "badge": [
        194.33333333333334,
        564
      ]
    },
    "hit_click": {
      "from": "hit",
      "to": "click",
      "path": "M172,646 L172,710",
      "badge": [
        172,
        678
      ]
    },
    "click_mouse": {
      "from": "click",
      "to": "mouse",
      "path": "M172,760 L172,1038",
      "badge": [
        172,
        899
      ]
    },
    "hit_retry": {
      "from": "hit",
      "to": "retry",
      "label": {
        "at": [
          275.969,
          739.2
        ],
        "text": "check fails"
      },
      "dashed": true,
      "path": "M216.66666666666669,646 L216.66666666666669,656 L347.5,656 L347.5,824",
      "badge": [
        347.5,
        669.5833333333334
      ]
    },
    "retry_stable": {
      "from": "retry",
      "to": "stable",
      "path": "M347.5,860 L347.5,870 L493.75,870 L493.75,924",
      "badge": [
        493.75,
        873.375
      ]
    },
    "enabled_inert": {
      "from": "enabled",
      "to": "inert",
      "path": "M194.33333333333334,304 L194.33333333333334,368",
      "badge": [
        194.33333333333334,
        336
      ]
    },
    "inert_scroll": {
      "from": "inert",
      "to": "scroll",
      "path": "M194.33333333333334,418 L194.33333333333334,482",
      "badge": [
        194.33333333333334,
        450
      ]
    }
  },
  "scenarios": [
    {
      "id": "how",
      "label": "How a click works",
      "display": {
        "counterLabel": false,
        "edges": "progressive",
        "edgeBadges": true,
        "nodeBadges": false,
        "log": "incremental"
      },
      "whole": {
        "title": "How a click works, at a glance",
        "text": "The numbers follow the order of the steps. The dot shows a click that succeeds the first time."
      },
      "steps": [
        {
          "id": "you-call-click-on-a-locator",
          "title": "You call click() on a locator",
          "text": "A locator is a recipe: a frame and a selector string. When you call `click()`, the locator passes that string to the frame.",
          "show": [
            "call"
          ],
          "current": [
            "call"
          ],
          "edges": [],
          "defs": [
            "locator"
          ],
          "sources": [
            {
              "label": "locator.ts:50-57",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/locator.ts#L50-L57"
            },
            {
              "label": "locator.ts:122-124",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/locator.ts#L122-L124"
            }
          ],
          "deeper": [
            {
              "title": "2.2 A locator stores the recipe, engines find the elements",
              "href": "/2-actions/2-2-locator-is-a-recipe/"
            }
          ]
        },
        {
          "id": "the-outer-loop-resolves-the-loca",
          "title": "The outer loop resolves the locator",
          "text": "Selector engines in the page turn the selector into elements. If nothing matches, the outer loop waits and looks again: 20, 50, 100, 100, then 500 ms.",
          "show": [
            "resolve"
          ],
          "current": [
            "resolve"
          ],
          "edges": [
            "call_resolve"
          ],
          "defs": [
            "outer",
            "engine"
          ],
          "sources": [
            {
              "label": "frames.ts:1195-1238",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1195-L1238"
            },
            {
              "label": "frames.ts:1141-1149",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1141-L1149"
            }
          ],
          "deeper": [
            {
              "title": "2.2 A locator stores the recipe, engines find the elements",
              "href": "/2-actions/2-2-locator-is-a-recipe/"
            }
          ]
        },
        {
          "id": "two-matches-fail-at-once",
          "title": "Two matches fail at once",
          "text": "An action needs exactly one element. If two or more match, the page throws a strict mode violation. Playwright does not wait or retry.",
          "show": [
            "strict"
          ],
          "current": [
            "strict"
          ],
          "edges": [
            "resolve_strict"
          ],
          "defs": [
            "strict"
          ],
          "code": "strict",
          "sources": [
            {
              "label": "injectedScript.ts:289-292",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L289-L292"
            },
            {
              "label": "injectedScript.ts:1337-1341",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L1337-L1341"
            }
          ],
          "deeper": [
            {
              "title": "2.2 A locator stores the recipe, engines find the elements",
              "href": "/2-actions/2-2-locator-is-a-recipe/"
            }
          ]
        },
        {
          "id": "the-inner-loop-checks-this-eleme",
          "title": "The inner loop checks this element",
          "text": "With one match, the inner loop starts a try. It checks *stable* first, then *visible*, *enabled* and *not inert*. The log still says “visible, enabled and stable”.",
          "show": [
            "stable",
            "visible",
            "enabled",
            "inert"
          ],
          "current": [
            "stable",
            "visible",
            "enabled",
            "inert"
          ],
          "edges": [
            "resolve_inner",
            "stable_visible",
            "visible_enabled",
            "enabled_inert"
          ],
          "defs": [
            "inner",
            "checks",
            "inert"
          ],
          "code": "order",
          "sources": [
            {
              "label": "injectedScript.ts:692-709",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L692-L709"
            },
            {
              "label": "dom.ts:432-450",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L432-L450"
            }
          ],
          "deeper": [
            {
              "title": "2.3 Stable is a count of equal boxes",
              "href": "/2-actions/2-3-stable-is-measured/"
            }
          ]
        },
        {
          "id": "stable-means-the-box-stopped-mov",
          "title": "Stable means the box stopped moving",
          "text": "The page compares the element's box on animation frames. By default, Chromium, Firefox and WebKit need one equal comparison.",
          "show": [],
          "current": [
            "stable"
          ],
          "edges": [],
          "defs": [
            "stable"
          ],
          "sources": [
            {
              "label": "injectedScript.ts:712-739",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L712-L739"
            },
            {
              "label": "crPage.ts:335-337",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/chromium/crPage.ts#L335-L337"
            },
            {
              "label": "wkPage.ts:977-979",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/webkit/wkPage.ts#L977-L979"
            }
          ],
          "deeper": [
            {
              "title": "2.3 Stable is a count of equal boxes",
              "href": "/2-actions/2-3-stable-is-measured/"
            }
          ]
        },
        {
          "id": "scroll-then-check-the-click-poin",
          "title": "Scroll, then check the click point",
          "text": "Playwright scrolls the element into view and computes the click point. The page checks that the element at that point is the target or inside it.",
          "show": [
            "scroll",
            "hit"
          ],
          "current": [
            "scroll",
            "hit"
          ],
          "edges": [
            "inert_scroll",
            "scroll_hit"
          ],
          "defs": [
            "hit"
          ],
          "sources": [
            {
              "label": "dom.ts:446-456",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L446-L456"
            },
            {
              "label": "injectedScript.ts:1087-1098",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L1087-L1098"
            }
          ],
          "deeper": [
            {
              "title": "2.4 A click checks what is under its point",
              "href": "/2-actions/2-4-who-gets-the-click/"
            }
          ]
        },
        {
          "id": "the-click-goes-to-the-browser",
          "title": "The click goes to the browser",
          "text": "Playwright sends mouse move, down and up at the click point. A listener in the page confirms that the events reached the target.",
          "show": [
            "click",
            "mouse"
          ],
          "current": [
            "click",
            "mouse"
          ],
          "edges": [
            "hit_click",
            "click_mouse"
          ],
          "defs": [],
          "sources": [
            {
              "label": "input.ts:263-289",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/input.ts#L263-L289"
            },
            {
              "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.4 A click checks what is under its point",
              "href": "/2-actions/2-4-who-gets-the-click/"
            },
            {
              "title": "2.6 A click waits for its navigation to start, not for the page to load",
              "href": "/2-actions/2-6-waiting-for-navigation/"
            }
          ]
        },
        {
          "id": "a-failed-check-means-try-again",
          "title": "A failed check means: try again",
          "text": "Any failed check ends the try. The inner loop tries the same element again after 0, 20, 100, 100, then 500 ms. It does not look for the element again.",
          "show": [
            "retry"
          ],
          "current": [
            "retry",
            "stable"
          ],
          "edges": [
            "hit_retry",
            "retry_stable"
          ],
          "defs": [
            "retry"
          ],
          "code": "retry",
          "sources": [
            {
              "label": "dom.ts:328-347",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L328-L347"
            }
          ],
          "deeper": [
            {
              "title": "2.3 Stable is a count of equal boxes",
              "href": "/2-actions/2-3-stable-is-measured/"
            },
            {
              "title": "2.4 A click checks what is under its point",
              "href": "/2-actions/2-4-who-gets-the-click/"
            }
          ]
        },
        {
          "id": "only-a-removed-element-sends-it",
          "title": "Only a removed element sends it back",
          "text": "If the app removed the element from the page, the try returns “not connected”. The outer loop then resolves the locator again and finds the new element.",
          "show": [],
          "current": [
            "resolve"
          ],
          "edges": [
            "detached"
          ],
          "defs": [
            "detached"
          ],
          "sources": [
            {
              "label": "frames.ts:1233-1238",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1233-L1238"
            }
          ],
          "deeper": [
            {
              "title": "2.2 A locator stores the recipe, engines find the elements",
              "href": "/2-actions/2-2-locator-is-a-recipe/"
            }
          ]
        },
        {
          "id": "one-timeout-for-both-loops",
          "title": "One timeout for both loops",
          "text": "Both loops share the action's deadline. When it runs out, the last call-log line says which check failed. You do not need `waitForTimeout` before a click.",
          "show": [
            "timeout"
          ],
          "current": [
            "timeout"
          ],
          "edges": [],
          "defs": [
            "timeout"
          ],
          "code": "timeout",
          "sources": [
            {
              "label": "frames.ts:1195-1199",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1195-L1199"
            },
            {
              "label": "dom.ts:328-347",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L328-L347"
            }
          ],
          "deeper": [
            {
              "title": "4.6 Each clock spends its own remaining budget",
              "href": "/4-runner/4-6-timeouts/"
            },
            {
              "title": "2.5 Force skips safeguards, but still needs a click point",
              "href": "/2-actions/2-5-what-force-skips/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "call",
          "step": "you-call-click-on-a-locator",
          "log": []
        },
        {
          "node": "resolve",
          "step": "the-outer-loop-resolves-the-loca",
          "log": [
            "waiting for getByRole('button', { name: 'Buy' })",
            "  locator resolved to <button>Buy</button>"
          ],
          "edge": "call_resolve"
        },
        {
          "node": "stable",
          "step": "the-inner-loop-checks-this-eleme",
          "log": [
            "attempting click action",
            "  waiting for element to be visible, enabled and stable"
          ],
          "edge": "resolve_inner"
        },
        {
          "node": "visible",
          "step": "the-inner-loop-checks-this-eleme",
          "log": [],
          "edge": "stable_visible"
        },
        {
          "node": "enabled",
          "step": "the-inner-loop-checks-this-eleme",
          "log": [],
          "edge": "visible_enabled"
        },
        {
          "node": "inert",
          "step": "the-inner-loop-checks-this-eleme",
          "log": [
            "  element is visible, enabled and stable"
          ],
          "edge": "enabled_inert"
        },
        {
          "node": "scroll",
          "step": "the-inner-loop-checks-this-eleme",
          "log": [
            "  scrolling into view if needed",
            "  done scrolling"
          ],
          "edge": "inert_scroll"
        },
        {
          "node": "hit",
          "step": "scroll-then-check-the-click-poin",
          "log": [],
          "edge": "scroll_hit"
        },
        {
          "node": "click",
          "step": "the-click-goes-to-the-browser",
          "log": [
            "  performing click action"
          ],
          "edge": "hit_click"
        },
        {
          "node": "mouse",
          "step": "the-click-goes-to-the-browser",
          "log": [
            "  click action done"
          ],
          "edge": "click_mouse"
        }
      ]
    },
    {
      "id": "overlay",
      "label": "Overlay",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": false,
        "nodeBadges": false,
        "log": "incremental"
      },
      "whole": {
        "title": "Overlay",
        "text": "The dot follows this scenario across the map, and the call log fills in as it goes."
      },
      "steps": [
        {
          "id": "the-locator-finds-one-button",
          "title": "The locator finds one button",
          "text": "The outer loop resolves the locator. One button matches.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "call",
            "resolve"
          ],
          "edges": [
            "call_resolve"
          ],
          "defs": [],
          "log": [
            "waiting for getByRole('button', { name: 'Buy' })",
            "  locator resolved to <button>Buy</button>"
          ],
          "sources": [
            {
              "label": "frames.ts:1195-1238",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1195-L1238"
            }
          ],
          "deeper": [
            {
              "title": "2.2 A locator stores the recipe, engines find the elements",
              "href": "/2-actions/2-2-locator-is-a-recipe/"
            }
          ]
        },
        {
          "id": "all-four-checks-pass",
          "title": "All four checks pass",
          "text": "The button is stable, visible, enabled and not inert.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "stable",
            "visible",
            "enabled",
            "inert"
          ],
          "edges": [
            "resolve_inner",
            "stable_visible",
            "visible_enabled",
            "enabled_inert"
          ],
          "defs": [],
          "log": [
            "attempting click action",
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable"
          ],
          "sources": [
            {
              "label": "injectedScript.ts:692-709",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L692-L709"
            },
            {
              "label": "dom.ts:432-450",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L432-L450"
            }
          ],
          "deeper": [
            {
              "title": "2.3 Stable is a count of equal boxes",
              "href": "/2-actions/2-3-stable-is-measured/"
            }
          ]
        },
        {
          "id": "a-spinner-covers-the-click-point",
          "title": "A spinner covers the click point",
          "text": "Playwright scrolls and finds the click point. The element there is the spinner, not the button.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "scroll",
            "hit"
          ],
          "edges": [
            "inert_scroll",
            "scroll_hit"
          ],
          "defs": [],
          "log": [
            "  scrolling into view if needed",
            "  done scrolling",
            "  <div class=\"spinner\"></div> intercepts pointer events"
          ],
          "sources": [
            {
              "label": "injectedScript.ts:1087-1098",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L1087-L1098"
            },
            {
              "label": "dom.ts:368-370",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L368-L370"
            }
          ],
          "deeper": [
            {
              "title": "2.4 A click checks what is under its point",
              "href": "/2-actions/2-4-who-gets-the-click/"
            }
          ]
        },
        {
          "id": "try-again-at-once",
          "title": "Try again at once",
          "text": "The first retry waits 0 ms. The same button passes the checks, and the spinner still covers it.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "retry",
            "stable",
            "visible",
            "enabled",
            "inert",
            "hit"
          ],
          "edges": [
            "hit_retry",
            "retry_stable"
          ],
          "defs": [],
          "log": [
            "retrying click action",
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  scrolling into view if needed",
            "  done scrolling",
            "  <div class=\"spinner\"></div> intercepts pointer events"
          ],
          "sources": [
            {
              "label": "dom.ts:328-347",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L328-L347"
            }
          ],
          "deeper": [
            {
              "title": "2.4 A click checks what is under its point",
              "href": "/2-actions/2-4-who-gets-the-click/"
            }
          ]
        },
        {
          "id": "wait-20-ms-and-try-again",
          "title": "Wait 20 ms and try again",
          "text": "The second retry waits 20 ms. Now the spinner is gone, and the button is under the click point.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "retry",
            "hit"
          ],
          "edges": [
            "hit_retry",
            "retry_stable"
          ],
          "defs": [],
          "log": [
            "retrying click action",
            "  waiting 20ms",
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  scrolling into view if needed",
            "  done scrolling"
          ],
          "sources": [
            {
              "label": "dom.ts:328-347",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L328-L347"
            }
          ],
          "deeper": [
            {
              "title": "2.4 A click checks what is under its point",
              "href": "/2-actions/2-4-who-gets-the-click/"
            }
          ]
        },
        {
          "id": "the-click-lands",
          "title": "The click lands",
          "text": "Playwright sends the mouse events, and the button gets the click.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "click",
            "mouse"
          ],
          "edges": [
            "hit_click",
            "click_mouse"
          ],
          "defs": [],
          "log": [
            "  performing click action",
            "  click action done"
          ],
          "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"
            }
          ],
          "deeper": [
            {
              "title": "2.4 A click checks what is under its point",
              "href": "/2-actions/2-4-who-gets-the-click/"
            },
            {
              "title": "2.6 A click waits for its navigation to start, not for the page to load",
              "href": "/2-actions/2-6-waiting-for-navigation/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "call",
          "step": "the-locator-finds-one-button",
          "log": []
        },
        {
          "node": "resolve",
          "step": "the-locator-finds-one-button",
          "log": [
            "waiting for getByRole('button', { name: 'Buy' })",
            "  locator resolved to <button>Buy</button>"
          ],
          "edge": "call_resolve"
        },
        {
          "node": "stable",
          "step": "all-four-checks-pass",
          "log": [
            "attempting click action",
            "  waiting for element to be visible, enabled and stable"
          ],
          "edge": "resolve_inner"
        },
        {
          "node": "visible",
          "step": "all-four-checks-pass",
          "log": [],
          "edge": "stable_visible"
        },
        {
          "node": "enabled",
          "step": "all-four-checks-pass",
          "log": [],
          "edge": "visible_enabled"
        },
        {
          "node": "inert",
          "step": "all-four-checks-pass",
          "log": [
            "  element is visible, enabled and stable"
          ],
          "edge": "enabled_inert"
        },
        {
          "node": "scroll",
          "step": "a-spinner-covers-the-click-point",
          "log": [
            "  scrolling into view if needed",
            "  done scrolling"
          ],
          "edge": "inert_scroll"
        },
        {
          "node": "hit",
          "step": "a-spinner-covers-the-click-point",
          "log": [
            "  <div class=\"spinner\"></div> intercepts pointer events"
          ],
          "edge": "scroll_hit",
          "fail": true
        },
        {
          "node": "retry",
          "step": "try-again-at-once",
          "log": [
            "retrying click action"
          ],
          "edge": "hit_retry"
        },
        {
          "node": "stable",
          "step": "try-again-at-once",
          "log": [
            "  waiting for element to be visible, enabled and stable"
          ],
          "edge": "retry_stable"
        },
        {
          "node": "visible",
          "step": "try-again-at-once",
          "log": [],
          "edge": "stable_visible"
        },
        {
          "node": "enabled",
          "step": "try-again-at-once",
          "log": [],
          "edge": "visible_enabled"
        },
        {
          "node": "inert",
          "step": "try-again-at-once",
          "log": [
            "  element is visible, enabled and stable"
          ],
          "edge": "enabled_inert"
        },
        {
          "node": "scroll",
          "step": "try-again-at-once",
          "log": [
            "  scrolling into view if needed",
            "  done scrolling"
          ],
          "edge": "inert_scroll"
        },
        {
          "node": "hit",
          "step": "try-again-at-once",
          "log": [
            "  <div class=\"spinner\"></div> intercepts pointer events"
          ],
          "edge": "scroll_hit",
          "fail": true
        },
        {
          "node": "retry",
          "step": "wait-20-ms-and-try-again",
          "log": [
            "retrying click action",
            "  waiting 20ms"
          ],
          "edge": "hit_retry"
        },
        {
          "node": "stable",
          "step": "wait-20-ms-and-try-again",
          "log": [
            "  waiting for element to be visible, enabled and stable"
          ],
          "edge": "retry_stable"
        },
        {
          "node": "visible",
          "step": "wait-20-ms-and-try-again",
          "log": [],
          "edge": "stable_visible"
        },
        {
          "node": "enabled",
          "step": "wait-20-ms-and-try-again",
          "log": [],
          "edge": "visible_enabled"
        },
        {
          "node": "inert",
          "step": "wait-20-ms-and-try-again",
          "log": [
            "  element is visible, enabled and stable"
          ],
          "edge": "enabled_inert"
        },
        {
          "node": "scroll",
          "step": "wait-20-ms-and-try-again",
          "log": [
            "  scrolling into view if needed",
            "  done scrolling"
          ],
          "edge": "inert_scroll"
        },
        {
          "node": "hit",
          "step": "wait-20-ms-and-try-again",
          "log": [],
          "edge": "scroll_hit"
        },
        {
          "node": "click",
          "step": "the-click-lands",
          "log": [
            "  performing click action"
          ],
          "edge": "hit_click"
        },
        {
          "node": "mouse",
          "step": "the-click-lands",
          "log": [
            "  click action done"
          ],
          "edge": "click_mouse"
        }
      ]
    },
    {
      "id": "moving",
      "label": "Moving",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": false,
        "nodeBadges": false,
        "log": "incremental"
      },
      "whole": {
        "title": "Moving",
        "text": "The dot follows this scenario across the map, and the call log fills in as it goes."
      },
      "steps": [
        {
          "id": "the-locator-finds-one-button",
          "title": "The locator finds one button",
          "text": "The outer loop resolves the locator. One button matches.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "call",
            "resolve"
          ],
          "edges": [
            "call_resolve"
          ],
          "defs": [],
          "log": [
            "waiting for getByRole('button', { name: 'Buy' })",
            "  locator resolved to <button>Buy</button>"
          ],
          "sources": [
            {
              "label": "frames.ts:1195-1238",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1195-L1238"
            }
          ],
          "deeper": [
            {
              "title": "2.2 A locator stores the recipe, engines find the elements",
              "href": "/2-actions/2-2-locator-is-a-recipe/"
            }
          ]
        },
        {
          "id": "the-button-still-moves",
          "title": "The button still moves",
          "text": "Its box changes between frames, so stable fails. Visible, enabled and not inert are not checked yet.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "stable"
          ],
          "edges": [
            "resolve_inner"
          ],
          "defs": [],
          "log": [
            "attempting click action",
            "  waiting for element to be visible, enabled and stable",
            "  element is not stable"
          ],
          "sources": [
            {
              "label": "injectedScript.ts:692-709",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L692-L709"
            },
            {
              "label": "dom.ts:372-379",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L372-L379"
            }
          ],
          "deeper": [
            {
              "title": "2.3 Stable is a count of equal boxes",
              "href": "/2-actions/2-3-stable-is-measured/"
            }
          ]
        },
        {
          "id": "try-again-at-once",
          "title": "Try again at once",
          "text": "The first retry waits 0 ms. The button still moves.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "retry",
            "stable"
          ],
          "edges": [
            "hit_retry",
            "retry_stable"
          ],
          "defs": [],
          "log": [
            "retrying click action",
            "  waiting for element to be visible, enabled and stable",
            "  element is not stable"
          ],
          "sources": [
            {
              "label": "dom.ts:328-347",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L328-L347"
            }
          ],
          "deeper": [
            {
              "title": "2.3 Stable is a count of equal boxes",
              "href": "/2-actions/2-3-stable-is-measured/"
            }
          ]
        },
        {
          "id": "wait-20-ms-the-button-stops",
          "title": "Wait 20 ms, the button stops",
          "text": "After 20 ms the box stays the same. All four checks pass.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "retry",
            "stable",
            "visible",
            "enabled",
            "inert"
          ],
          "edges": [
            "retry_stable",
            "stable_visible",
            "visible_enabled",
            "enabled_inert"
          ],
          "defs": [],
          "log": [
            "retrying click action",
            "  waiting 20ms",
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable"
          ],
          "sources": [
            {
              "label": "dom.ts:328-347",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L328-L347"
            }
          ],
          "deeper": [
            {
              "title": "2.3 Stable is a count of equal boxes",
              "href": "/2-actions/2-3-stable-is-measured/"
            }
          ]
        },
        {
          "id": "scroll-hit-target-click",
          "title": "Scroll, hit target, click",
          "text": "Nothing covers the button. The click lands.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "scroll",
            "hit",
            "click",
            "mouse"
          ],
          "edges": [
            "inert_scroll",
            "scroll_hit",
            "hit_click",
            "click_mouse"
          ],
          "defs": [],
          "log": [
            "  scrolling into view if needed",
            "  done scrolling",
            "  performing click action",
            "  click action done"
          ],
          "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"
            }
          ],
          "deeper": [
            {
              "title": "2.4 A click checks what is under its point",
              "href": "/2-actions/2-4-who-gets-the-click/"
            },
            {
              "title": "2.6 A click waits for its navigation to start, not for the page to load",
              "href": "/2-actions/2-6-waiting-for-navigation/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "call",
          "step": "the-locator-finds-one-button",
          "log": []
        },
        {
          "node": "resolve",
          "step": "the-locator-finds-one-button",
          "log": [
            "waiting for getByRole('button', { name: 'Buy' })",
            "  locator resolved to <button>Buy</button>"
          ],
          "edge": "call_resolve"
        },
        {
          "node": "stable",
          "step": "the-button-still-moves",
          "log": [
            "attempting click action",
            "  waiting for element to be visible, enabled and stable",
            "  element is not stable"
          ],
          "edge": "resolve_inner",
          "fail": true
        },
        {
          "node": "retry",
          "step": "try-again-at-once",
          "log": [
            "retrying click action"
          ],
          "edge": "retry_stable",
          "reverse": true
        },
        {
          "node": "stable",
          "step": "try-again-at-once",
          "log": [
            "  waiting for element to be visible, enabled and stable",
            "  element is not stable"
          ],
          "edge": "retry_stable",
          "fail": true
        },
        {
          "node": "retry",
          "step": "wait-20-ms-the-button-stops",
          "log": [
            "retrying click action",
            "  waiting 20ms"
          ],
          "edge": "retry_stable",
          "reverse": true
        },
        {
          "node": "stable",
          "step": "wait-20-ms-the-button-stops",
          "log": [
            "  waiting for element to be visible, enabled and stable"
          ],
          "edge": "retry_stable"
        },
        {
          "node": "visible",
          "step": "wait-20-ms-the-button-stops",
          "log": [],
          "edge": "stable_visible"
        },
        {
          "node": "enabled",
          "step": "wait-20-ms-the-button-stops",
          "log": [],
          "edge": "visible_enabled"
        },
        {
          "node": "inert",
          "step": "wait-20-ms-the-button-stops",
          "log": [
            "  element is visible, enabled and stable"
          ],
          "edge": "enabled_inert"
        },
        {
          "node": "scroll",
          "step": "scroll-hit-target-click",
          "log": [
            "  scrolling into view if needed",
            "  done scrolling"
          ],
          "edge": "inert_scroll"
        },
        {
          "node": "hit",
          "step": "scroll-hit-target-click",
          "log": [],
          "edge": "scroll_hit"
        },
        {
          "node": "click",
          "step": "scroll-hit-target-click",
          "log": [
            "  performing click action"
          ],
          "edge": "hit_click"
        },
        {
          "node": "mouse",
          "step": "scroll-hit-target-click",
          "log": [
            "  click action done"
          ],
          "edge": "click_mouse"
        }
      ]
    },
    {
      "id": "replaced",
      "label": "Replaced",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": false,
        "nodeBadges": false,
        "log": "incremental"
      },
      "whole": {
        "title": "Replaced",
        "text": "The dot follows this scenario across the map, and the call log fills in as it goes."
      },
      "steps": [
        {
          "id": "the-locator-finds-button-1",
          "title": "The locator finds button #1",
          "text": "The outer loop resolves the locator to the first button element.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "call",
            "resolve"
          ],
          "edges": [
            "call_resolve"
          ],
          "defs": [],
          "log": [
            "waiting for getByRole('button', { name: 'Buy' })",
            "  locator resolved to <button>Buy</button>"
          ],
          "sources": [
            {
              "label": "frames.ts:1195-1238",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1195-L1238"
            }
          ],
          "deeper": [
            {
              "title": "2.2 A locator stores the recipe, engines find the elements",
              "href": "/2-actions/2-2-locator-is-a-recipe/"
            }
          ]
        },
        {
          "id": "the-app-replaces-the-button",
          "title": "The app replaces the button",
          "text": "During the try, the app re-renders and removes button #1. The inner loop gives up on that element.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "stable",
            "resolve"
          ],
          "edges": [
            "resolve_inner",
            "detached"
          ],
          "defs": [],
          "log": [
            "attempting click action",
            "  waiting for element to be visible, enabled and stable",
            "element was detached from the DOM, retrying"
          ],
          "sources": [
            {
              "label": "frames.ts:1233-1238",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1233-L1238"
            }
          ],
          "deeper": [
            {
              "title": "2.2 A locator stores the recipe, engines find the elements",
              "href": "/2-actions/2-2-locator-is-a-recipe/"
            }
          ]
        },
        {
          "id": "the-outer-loop-finds-button-2",
          "title": "The outer loop finds button #2",
          "text": "The outer loop resolves the locator again and gets the new button.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "resolve"
          ],
          "edges": [
            "call_resolve"
          ],
          "defs": [],
          "log": [
            "  locator resolved to <button>Buy</button>"
          ],
          "sources": [
            {
              "label": "frames.ts:1195-1238",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1195-L1238"
            }
          ],
          "deeper": [
            {
              "title": "2.2 A locator stores the recipe, engines find the elements",
              "href": "/2-actions/2-2-locator-is-a-recipe/"
            }
          ]
        },
        {
          "id": "checks-pass-the-click-lands",
          "title": "Checks pass, the click lands",
          "text": "The new button passes every check and gets the click.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "mouse"
          ],
          "edges": [
            "resolve_inner",
            "stable_visible",
            "visible_enabled",
            "inert_scroll",
            "scroll_hit",
            "hit_click",
            "click_mouse",
            "enabled_inert"
          ],
          "defs": [],
          "log": [
            "attempting click action",
            "  waiting for element to be visible, enabled and stable",
            "  element is visible, enabled and stable",
            "  scrolling into view if needed",
            "  done scrolling",
            "  performing click action",
            "  click action done"
          ],
          "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"
            }
          ],
          "deeper": [
            {
              "title": "2.3 Stable is a count of equal boxes",
              "href": "/2-actions/2-3-stable-is-measured/"
            },
            {
              "title": "2.4 A click checks what is under its point",
              "href": "/2-actions/2-4-who-gets-the-click/"
            },
            {
              "title": "2.6 A click waits for its navigation to start, not for the page to load",
              "href": "/2-actions/2-6-waiting-for-navigation/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "call",
          "step": "the-locator-finds-button-1",
          "log": []
        },
        {
          "node": "resolve",
          "step": "the-locator-finds-button-1",
          "log": [
            "waiting for getByRole('button', { name: 'Buy' })",
            "  locator resolved to <button>Buy</button>"
          ],
          "edge": "call_resolve"
        },
        {
          "node": "stable",
          "step": "the-app-replaces-the-button",
          "log": [
            "attempting click action",
            "  waiting for element to be visible, enabled and stable"
          ],
          "edge": "resolve_inner",
          "fail": true
        },
        {
          "node": "resolve",
          "step": "the-app-replaces-the-button",
          "log": [
            "element was detached from the DOM, retrying"
          ],
          "edge": "detached"
        },
        {
          "node": "resolve",
          "step": "the-outer-loop-finds-button-2",
          "log": [
            "  locator resolved to <button>Buy</button>"
          ]
        },
        {
          "node": "stable",
          "step": "checks-pass-the-click-lands",
          "log": [
            "attempting click action",
            "  waiting for element to be visible, enabled and stable"
          ],
          "edge": "resolve_inner"
        },
        {
          "node": "visible",
          "step": "checks-pass-the-click-lands",
          "log": [],
          "edge": "stable_visible"
        },
        {
          "node": "enabled",
          "step": "checks-pass-the-click-lands",
          "log": [],
          "edge": "visible_enabled"
        },
        {
          "node": "inert",
          "step": "checks-pass-the-click-lands",
          "log": [
            "  element is visible, enabled and stable"
          ],
          "edge": "enabled_inert"
        },
        {
          "node": "scroll",
          "step": "checks-pass-the-click-lands",
          "log": [
            "  scrolling into view if needed",
            "  done scrolling"
          ],
          "edge": "inert_scroll"
        },
        {
          "node": "hit",
          "step": "checks-pass-the-click-lands",
          "log": [],
          "edge": "scroll_hit"
        },
        {
          "node": "click",
          "step": "checks-pass-the-click-lands",
          "log": [
            "  performing click action"
          ],
          "edge": "hit_click"
        },
        {
          "node": "mouse",
          "step": "checks-pass-the-click-lands",
          "log": [
            "  click action done"
          ],
          "edge": "click_mouse"
        }
      ]
    },
    {
      "id": "strict",
      "label": "Two matches",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": false,
        "nodeBadges": false,
        "log": "incremental"
      },
      "whole": {
        "title": "Two matches",
        "text": "The dot follows this scenario across the map, and the call log fills in as it goes."
      },
      "steps": [
        {
          "id": "two-buttons-match",
          "title": "Two buttons match",
          "text": "The page finds two Buy buttons and throws at once. There is no wait and no retry.",
          "show": [
            "call",
            "timeout",
            "resolve",
            "strict",
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click",
            "retry",
            "mouse"
          ],
          "current": [
            "call",
            "resolve",
            "strict"
          ],
          "edges": [
            "call_resolve",
            "resolve_strict"
          ],
          "defs": [],
          "code": "strict",
          "log": [
            "waiting for getByRole('button', { name: 'Buy' })",
            "Error: strict mode violation: getByRole('button', { name: 'Buy' }) resolved to 2 elements:"
          ],
          "fix": "Make the locator match one element.",
          "sources": [
            {
              "label": "injectedScript.ts:289-292",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L289-L292"
            },
            {
              "label": "injectedScript.ts:1337-1341",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L1337-L1341"
            }
          ],
          "deeper": [
            {
              "title": "2.2 A locator stores the recipe, engines find the elements",
              "href": "/2-actions/2-2-locator-is-a-recipe/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "call",
          "step": "two-buttons-match",
          "log": []
        },
        {
          "node": "resolve",
          "step": "two-buttons-match",
          "log": [
            "waiting for getByRole('button', { name: 'Buy' })"
          ],
          "edge": "call_resolve"
        },
        {
          "node": "strict",
          "step": "two-buttons-match",
          "log": [
            "Error: strict mode violation: getByRole('button', { name: 'Buy' }) resolved to 2 elements:"
          ],
          "edge": "resolve_strict",
          "fail": true
        }
      ]
    }
  ],
  "definitions": {
    "locator": {
      "term": "Locator",
      "text": "A recipe: a frame and a selector string. It holds no element until an action resolves it."
    },
    "outer": {
      "term": "Outer loop",
      "text": "Finds the element. If nothing matches, it waits and looks again."
    },
    "engine": {
      "term": "Selector engine",
      "text": "Code in the page that turns one selector part (css, text, role…) into elements."
    },
    "strict": {
      "term": "Strict mode",
      "text": "An action needs exactly one element. Two or more matches fail at once."
    },
    "inner": {
      "term": "Inner loop",
      "text": "Tries to act on the element the outer loop found, again and again."
    },
    "checks": {
      "term": "Actionability checks",
      "text": "Stable, visible, enabled and not inert, then scroll and the hit target check."
    },
    "stable": {
      "term": "Stable",
      "text": "The element's box stays the same between animation frames."
    },
    "hit": {
      "term": "Hit target",
      "text": "The element at the click point must be the target or inside it."
    },
    "retry": {
      "term": "Retry",
      "text": "A failed check ends one try. The next try uses the same element after a short wait."
    },
    "detached": {
      "term": "Detached",
      "text": "The app removed the element from the page. Only then does the outer loop look again."
    },
    "timeout": {
      "term": "Action timeout",
      "text": "One deadline for both loops. When it runs out, the last call-log line names the failed check."
    },
    "inert": {
      "term": "Not inert",
      "text": "The element and its parents have no inert attribute."
    }
  },
  "code": {
    "strict": {
      "title": "In your test · strict mode",
      "lines": [
        "// ✗ Two \"Buy\" buttons match",
        "await page",
        "  .getByRole('button', { name: 'Buy' })",
        "  .click();",
        "",
        "// ✓ Find the one in the cart",
        "await page",
        "  .getByTestId('cart')",
        "  .getByRole('button', { name: 'Buy' })",
        "  .click();"
      ]
    },
    "order": {
      "title": "Inside Playwright · injectedScript.ts",
      "source": {
        "label": "injectedScript.ts:692-709",
        "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L692-L709"
      },
      "lines": [
        "if (states.includes('stable')) {",
        "  const stableResult = await",
        "    this._checkElementIsStable(node);",
        "  if (stableResult === false)",
        "    return { missingState: 'stable' };",
        "  …",
        "}",
        "for (const state of states) {",
        "  if (state !== 'stable') { … }",
        "}"
      ]
    },
    "retry": {
      "title": "Inside Playwright · dom.ts",
      "source": {
        "label": "dom.ts:330-330",
        "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L330"
      },
      "lines": [
        "// We progressively wait longer between",
        "// retries, up to 500ms.",
        "const waitTime = [0, 20, 100, 100, 500];"
      ]
    },
    "timeout": {
      "title": "In your test · timeout",
      "lines": [
        "// ✗ Not needed: the loops already wait",
        "await page.waitForTimeout(1000);",
        "",
        "// ✓ Set the deadline for both loops",
        "await page",
        "  .getByRole('button', { name: 'Buy' })",
        "  .click({ timeout: 5_000 });"
      ]
    }
  },
  "conceptScenario": "how",
  "concepts": [
    {
      "label": "Your test",
      "layer": "client",
      "items": [
        {
          "definition": "locator",
          "short": "A recipe: a frame and a selector string, without an element yet.",
          "nodes": [
            "call"
          ],
          "step": {
            "step": "you-call-click-on-a-locator"
          },
          "source": {
            "label": "locator.ts:50-57",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/locator.ts#L50-L57"
          }
        },
        {
          "definition": "timeout",
          "short": "One deadline for both loops; the last log line names the failed check.",
          "nodes": [
            "timeout"
          ],
          "step": {
            "step": "one-timeout-for-both-loops"
          },
          "source": {
            "label": "frames.ts:1195-1199",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1195-L1199"
          }
        }
      ]
    },
    {
      "label": "Outer loop · find the element",
      "layer": "server",
      "items": [
        {
          "definition": "outer",
          "short": "Resolves the locator; with no match it waits and looks again.",
          "nodes": [
            "resolve"
          ],
          "step": {
            "step": "the-outer-loop-resolves-the-loca"
          },
          "source": {
            "label": "frames.ts:1195-1238",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1195-L1238"
          }
        },
        {
          "definition": "engine",
          "short": "Page code that turns one selector part into elements.",
          "nodes": [
            "resolve"
          ],
          "step": {
            "step": "the-outer-loop-resolves-the-loca"
          },
          "source": {
            "label": "injectedScript.ts:433-439",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L433-L439"
          }
        },
        {
          "definition": "strict",
          "short": "Two or more matches fail at once, with no wait.",
          "nodes": [
            "strict"
          ],
          "step": {
            "step": "two-matches-fail-at-once"
          },
          "source": {
            "label": "injectedScript.ts:289-292",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L289-L292"
          }
        },
        {
          "definition": "detached",
          "short": "The app removed the element; only then the outer loop looks again.",
          "nodes": [
            "resolve"
          ],
          "step": {
            "step": "only-a-removed-element-sends-it"
          },
          "source": {
            "label": "frames.ts:1233-1238",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/frames.ts#L1233-L1238"
          }
        }
      ]
    },
    {
      "label": "Inner loop · try this element",
      "layer": "page",
      "items": [
        {
          "definition": "inner",
          "short": "Tries to act on the element the outer loop found.",
          "nodes": [
            "stable",
            "visible",
            "enabled",
            "inert",
            "scroll",
            "hit",
            "click"
          ],
          "step": {
            "step": "the-inner-loop-checks-this-eleme"
          },
          "source": {
            "label": "dom.ts:328-347",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L328-L347"
          }
        },
        {
          "definition": "checks",
          "short": "Stable, visible, enabled and not inert, then the hit target; run in the page.",
          "nodes": [
            "stable",
            "visible",
            "enabled",
            "inert",
            "hit"
          ],
          "step": {
            "step": "the-inner-loop-checks-this-eleme"
          },
          "source": {
            "label": "injectedScript.ts:692-709",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L692-L709"
          }
        },
        {
          "definition": "inert",
          "short": "The element and its parents have no inert attribute.",
          "nodes": [
            "inert"
          ],
          "step": {
            "step": "the-inner-loop-checks-this-eleme"
          },
          "source": {
            "label": "injectedScript.ts:807-813",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L807-L813"
          }
        },
        {
          "definition": "stable",
          "short": "The element's box stays the same between animation frames.",
          "nodes": [
            "stable"
          ],
          "step": {
            "step": "stable-means-the-box-stopped-mov"
          },
          "source": {
            "label": "injectedScript.ts:712-739",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L712-L739"
          }
        },
        {
          "definition": "hit",
          "short": "The element at the click point is the target or inside it.",
          "nodes": [
            "hit"
          ],
          "step": {
            "step": "scroll-then-check-the-click-poin"
          },
          "source": {
            "label": "injectedScript.ts:1087-1098",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/injected/src/injectedScript.ts#L1087-L1098"
          }
        },
        {
          "definition": "retry",
          "short": "A failed check ends one try; the next try reuses the element.",
          "nodes": [
            "retry"
          ],
          "step": {
            "step": "a-failed-check-means-try-again"
          },
          "source": {
            "label": "dom.ts:328-347",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/dom.ts#L328-L347"
          }
        }
      ]
    }
  ],
  "callouts": {
    "1": [
      "resolve"
    ],
    "2": [
      "visible",
      "stable",
      "enabled",
      "inert",
      "scroll",
      "hit",
      "click"
    ],
    "3": [
      "stable"
    ],
    "4": [
      "retry"
    ],
    "5": [
      "strict"
    ]
  },
  "deeper": [
    {
      "title": "2.2 A locator stores the recipe, engines find the elements",
      "href": "/2-actions/2-2-locator-is-a-recipe/",
      "why": "What a locator keeps and how engines resolve it."
    },
    {
      "title": "2.3 Stable is a count of equal boxes",
      "href": "/2-actions/2-3-stable-is-measured/",
      "why": "How stability is measured, per browser."
    },
    {
      "title": "2.4 A click checks what is under its point",
      "href": "/2-actions/2-4-who-gets-the-click/",
      "why": "Scrolling, the click point and the hit-target check."
    },
    {
      "title": "2.5 Force skips safeguards, but still needs a click point",
      "href": "/2-actions/2-5-what-force-skips/",
      "why": "Which checks force: true skips."
    },
    {
      "title": "2.6 A click waits for its navigation to start, not for the page to load",
      "href": "/2-actions/2-6-waiting-for-navigation/",
      "why": "What happens after the click."
    },
    {
      "title": "4.6 Each clock spends its own remaining budget",
      "href": "/4-runner/4-6-timeouts/",
      "why": "Action, test and fixture timeouts."
    }
  ],
  "viewBox": [
    923.3333333333333,
    1102
  ],
  "measurement": {
    "name": "font-table",
    "labels": {
      "resolve_inner": {
        "width": 44.24699999999999,
        "height": 12.6
      },
      "detached": {
        "width": 50.56799999999999,
        "height": 12.6
      },
      "hit_retry": {
        "width": 69.53099999999999,
        "height": 12.6
      }
    }
  }
}
