mirror of
https://github.com/lukaszraczylo/mcp-captcharesolver.git
synced 2026-10-14 00:57:55 +00:00
22 lines
489 B
Go
22 lines
489 B
Go
package stealth
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestStealthScript(t *testing.T) {
|
|
res := StealthScript(ScriptParams{Engine: "playwright"})
|
|
if res.Script == "" {
|
|
t.Fatal("empty script")
|
|
}
|
|
for _, want := range []string{"navigator.webdriver", "languages", "WebGL", "chrome"} {
|
|
if !strings.Contains(res.Script, want) {
|
|
t.Fatalf("script missing %q", want)
|
|
}
|
|
}
|
|
if res.Apply.How == "" || len(res.IncludedEvasions) == 0 {
|
|
t.Fatalf("missing apply metadata: %+v", res)
|
|
}
|
|
}
|