Skip to content

Stealth Chromium that passes every bot detection test. Drop-in Playwright replacement with source-level fingerprint patches. 50+ tests passed.

fix(humanize): pass frameVisible to InjectedScript state checks (#586) (#587)

laplace-anonbd89505888dc
diff --git a/cloakbrowser/human/world.py b/cloakbrowser/human/world.py
index aee17da..ea5eccf 100644
--- a/cloakbrowser/human/world.py
+++ b/cloakbrowser/human/world.py
@@ -150,14 +150,14 @@ const H = {
const e = get(id);
try {
if (I.checkElementStates) {
- const r = await I.checkElementStates(e, states);
+ const r = await I.checkElementStates(e, states, true);
if (r === undefined) return null;
if (r === 'error:notconnected') return { missing: 'attached' };
return { missing: r.missingState };
}
for (const s of states) {
if (s === 'stable') continue;
- const r = I.elementState(e, s);
+ const r = I.elementState(e, s, true);
if (r === 'error:notconnected' || r.received === 'error:notconnected') return { missing: 'attached' };
if (!(r.matches !== undefined ? r.matches : r)) return { missing: s };
}
diff --git a/dotnet/src/CloakBrowser/Human/WorldHelpers.cs b/dotnet/src/CloakBrowser/Human/WorldHelpers.cs
index d4ea2c3..c132f63 100644
--- a/dotnet/src/CloakBrowser/Human/WorldHelpers.cs
+++ b/dotnet/src/CloakBrowser/Human/WorldHelpers.cs
@@ -127,14 +127,14 @@ const H = {
const e = get(id);
try {
if (I.checkElementStates) {
- const r = await I.checkElementStates(e, states);
+ const r = await I.checkElementStates(e, states, true);
if (r === undefined) return null;
if (r === 'error:notconnected') return { missing: 'attached' };
return { missing: r.missingState };
}
for (const s of states) {
if (s === 'stable') continue;
- const r = I.elementState(e, s);
+ const r = I.elementState(e, s, true);
if (r === 'error:notconnected' || r.received === 'error:notconnected') return { missing: 'attached' };
if (!(r.matches !== undefined ? r.matches : r)) return { missing: s };
}
diff --git a/js/src/human/worldHelpers.ts b/js/src/human/worldHelpers.ts
index 462690c..65fac9e 100644
--- a/js/src/human/worldHelpers.ts
+++ b/js/src/human/worldHelpers.ts
@@ -123,14 +123,14 @@ const H = {
const e = get(id);
try {
if (I.checkElementStates) {
- const r = await I.checkElementStates(e, states);
+ const r = await I.checkElementStates(e, states, true);
if (r === undefined) return null;
if (r === 'error:notconnected') return { missing: 'attached' };
return { missing: r.missingState };
}
for (const s of states) {
if (s === 'stable') continue;
- const r = I.elementState(e, s);
+ const r = I.elementState(e, s, true);
if (r === 'error:notconnected' || r.received === 'error:notconnected') return { missing: 'attached' };
if (!(r.matches !== undefined ? r.matches : r)) return { missing: s };
}