Files
egutierrez 47fac22230 chore: auto-commit (799 archivos)
- .claude/CLAUDE.md
- .claude/commands/subagentes.md
- .claude/rules/INDEX.md
- .mcp.json
- bash/functions/cybersecurity/analyze_dns.md
- bash/functions/cybersecurity/audit_http_headers.md
- bash/functions/cybersecurity/audit_ssh_config.md
- bash/functions/cybersecurity/check_firewall.md
- bash/functions/cybersecurity/detect_suspicious_users.md
- bash/functions/cybersecurity/encrypt_file.md
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 00:28:20 +02:00

1.8 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, example, tested, tests, test_file_path, file_path, notes, documentation, params, output
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports example tested tests test_file_path file_path notes documentation params output
cdp_click_text function go browser 0.1.0 impure func CdpClickText(c *CDPConn, text string, opts FindByTextOpts) error Localiza el primer elemento cuyo innerText matchea el texto dado y le hace click. Composicion de CdpFindByText + CdpClick. Mas robusto que click por selector CSS porque el texto visible cambia menos que la estructura del DOM.
browser
cdp
click
locator
accessibility
pendiente-usar
cdp_find_by_text_go_browser
cdp_click_go_browser
false error_go_core
c, _ := browser.CdpConnect(9222) defer browser.CdpClose(c, 0) err := browser.CdpClickText(c, "Sign in", browser.FindByTextOpts{Tag: "button"}) if err != nil { log.Fatal(err) } true
TestCdpClickText_returnsErrorOnEmpty
functions/browser/cdp_click_text_test.go functions/browser/cdp_click_text.go - Devuelve error si no encuentra ningun elemento con ese texto — fail-loud, no falso positivo. - Reusa la heuristica leafmost de CdpFindByText (click va al elemento mas interno con el texto). - Para multiples coincidencias (ej. dos botones "OK"), pasar opts.Tag o usar un texto mas especifico. Patron `getByText(...).click()` de Playwright. Reduce mantenimiento de tests e2e: cuando el frontend renombra clases CSS o reordena DOM, el test sigue funcionando si el texto visible no cambia.
name desc
c Conexion CDP activa.
name desc
text Texto del elemento a clickar.
name desc
opts FindByTextOpts (mismos campos que CdpFindByText).
nil si click OK, error con descripcion si no encuentra elemento o click falla.