Skip to content

Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)

Python
590 B
Raw Blame
"""Browser contracts for FCC's advisory autofill opt-outs."""


def assert_autofill_opt_out(page):
    failures = page.locator(
        'form, textarea, input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"])'
    ).evaluate_all("""nodes => nodes.flatMap(node => {
      const valid = node.autocomplete === 'off' && node.hasAttribute('data-1p-ignore') &&
        node.hasAttribute('data-bwignore') && node.getAttribute('data-form-type') === 'other';
      return valid ? [] : [{id: node.id, tag: node.tagName, type: node.type}];
    })""")
    assert failures == [], failures