Spaces:
Running
Running
Download e2e/form_support.py from dherain24/claude-proxy: direct link, hf CLI and curl.
- Browser
- Download file 590 Bytes
-
https://huggingface.co/spaces/dherain24/claude-proxy/resolve/main/e2e/form_support.py
- Command line
-
hf download hf://spaces/dherain24/claude-proxy/e2e/form_support.py
-
curl -L -o form_support.py https://huggingface.co/spaces/dherain24/claude-proxy/resolve/main/e2e/form_support.py
590 Bytes
| """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 | |