<div class="daterangepicker dropdown-menu opensright" style="display: block; ...">
<div class="ranges">
<ul>
<li class="active">Hoy</li>
<li>Últimos 7 Días</li>
<li>Mes Actual</li>
...
</ul>
</div>
<div class="calendar left">...</div>
</div>
Call page.click("text=Hoy", timeout=10000) (via the humanized wrapper, humanize=True).
3. Observe ElementNotVisibleError: Element 'text=Hoy' failed visible check: element is not visible after the full timeout elapses.
4. Retry with force=True → this skips ensure_actionable() entirely but still calls scroll_to_element(), which now raises RuntimeError: Element not found while scrolling into view because get_box() returns None.
This strongly suggests a false negative in the in-world visibility computation added/changed in 0.5.x, rather than a real rendering issue.
CloakBrowser 0.5.8 — false-negative 'visible' actionability check
====================================================================
Environment
-----------
cloakbrowser (wrapper): 0.5.8 (regression)
Known-good version: 0.4.11 (confirmed working, same code, same site)
Browser binary: v146 (free tier)
Playwright: 1.61.0
Python: 3.12.13
OS: Linux 6.8.0-137-generic x86_64 (Docker, glibc 2.41)
Launch options: launch_persistent_context(
PROFILE_DIR,
headless=False,
humanize=True,
viewport={"width": 1920, "height": 1080},
accept_downloads=True,
args=['--start-maximized'],
)
Failing call
------------
page.click("text=Hoy", timeout=10000)
... where "Hoy" is a <li class="active">Hoy</li> inside an open
Bootstrap-style dropdown menu (.daterangepicker.dropdown-menu.opensright,
style="display: block; ..."), toggled open by an earlier click on its
trigger element (not a page navigation).
A screenshot taken via page.screenshot() at the exact moment of each
failure below shows the "Hoy" element fully rendered, orange-highlighted,
and unobstructed -- visually identical to a manual (non-automated)
inspection of the same dropdown in a separate, unrelated browser session.
====================================================================
Occurrence 1 -- job started 2026-08-20T21:02:24.358196Z
====================================================================
2026-08-20 21:02:xx [INFO] Clicking filter option 'Hoy'...
2026-08-20 21:02:xx [WARNING] Click failed on 'Hoy': Element 'text=Hoy'
failed visible check: element is not visible, retrying force click
after overlay check...
2026-08-20 21:03:04.397 [ERROR] Error during scraping: Element not found
while scrolling into view
Traceback (most recent call last):
File "/app/scraper.py", line 463, in run_scraper
page.click("text=Hoy", timeout=10000)
File "/app/cloakbrowser/human/__init__.py", line 1081, in _human_click
ensure_actionable(page, selector, CHECKS_CLICK, timeout=_remaining_ms(), force=force)
File "/app/cloakbrowser/human/actionability.py", line 163, in ensure_actionable
raise last_error
File "/app/cloakbrowser/human/actionability.py", line 169, in ensure_actionable
if not _stealth_actionable(page, selector, checks):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/cloakbrowser/human/actionability.py", line 109, in _stealth_actionable
raise ElementNotVisibleError(selector)
cloakbrowser.human.actionability.ElementNotVisibleError: Element 'text=Hoy' failed visible check: element is not visible
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/scraper.py", line 467, in run_scraper
page.click("text=Hoy", force=True)
File "/app/cloakbrowser/human/__init__.py", line 1084, in _human_click
box, cx, cy, did_scroll = scroll_to_element(
^^^^^^^^^^^^^^^^^^
File "/app/cloakbrowser/human/scroll.py", line 231, in scroll_to_element
return human_scroll_into_view(
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/cloakbrowser/human/scroll.py", line 131, in human_scroll_into_view
raise RuntimeError("Element not found while scrolling into view")
RuntimeError: Element not found while scrolling into view
2026-08-20 21:03:04.400 [INFO] Screenshot saved to: /app/downloads/error_20260820_210304.png
2026-08-20 21:03:04.397 [INFO] Scraper session ended. Total duration: 40.04 seconds
Job Failed Logic: {'status': 'error', 'message': 'Element not found while scrolling into view', ...,
'scrapedAt': '2026-08-20T21:02:24.358196Z'}
====================================================================
Occurrence 2 -- job started 2026-08-20T21:03:33.499457Z
====================================================================
2026-08-20 21:03:56.766 [INFO] Clicking filter option 'Hoy'...
2026-08-20 21:04:06.809 [WARNING] Click failed on 'Hoy': Element 'text=Hoy'
failed visible check: element is not visible, retrying force click
after overlay check...
2026-08-20 21:04:08.930 [ERROR] Error during scraping: Element not found
while scrolling into view
Traceback (most recent call last):
File "/app/scraper.py", line 463, in run_scraper
page.click("text=Hoy", timeout=10000)
File "/app/cloakbrowser/human/__init__.py", line 1081, in _human_click
ensure_actionable(page, selector, CHECKS_CLICK, timeout=_remaining_ms(), force=force)
File "/app/cloakbrowser/human/actionability.py", line 163, in ensure_actionable
raise last_error
File "/app/cloakbrowser/human/actionability.py", line 169, in ensure_actionable
if not _stealth_actionable(page, selector, checks):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/cloakbrowser/human/actionability.py", line 109, in _stealth_actionable
raise ElementNotVisibleError(selector)
cloakbrowser.human.actionability.ElementNotVisibleError: Element 'text=Hoy' failed visible check: element is not visible
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/scraper.py", line 467, in run_scraper
page.click("text=Hoy", force=True)
File "/app/cloakbrowser/human/__init__.py", line 1084, in _human_click
box, cx, cy, did_scroll = scroll_to_element(
^^^^^^^^^^^^^^^^^^
File "/app/cloakbrowser/human/scroll.py", line 231, in scroll_to_element
return human_scroll_into_view(
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/cloakbrowser/human/scroll.py", line 131, in human_scroll_into_view
raise RuntimeError("Element not found while scrolling into view")
RuntimeError: Element not found while scrolling into view
2026-08-20 21:04:09.112 [INFO] Screenshot saved to: /app/downloads/error_20260820_210408.png
2026-08-20 21:04:09.112 [INFO] Scraper session ended. Total duration: 35.61 seconds
Job Failed Logic: {'status': 'error', 'message': 'Element not found while scrolling into view', ...,
'scrapedAt': '2026-08-20T21:03:33.499457Z'}
====================================================================
Occurrence 3 -- job started 2026-08-20T21:04:47.601244Z
====================================================================
2026-08-20 21:05:08.880 [INFO] Clicking filter option 'Hoy'...
2026-08-20 21:05:18.918 [WARNING] Click failed on 'Hoy': Element 'text=Hoy'
failed visible check: element is not visible, retrying force click
after overlay check...
2026-08-20 21:05:21.014 [ERROR] Error during scraping: Element not found
while scrolling into view
Traceback (most recent call last):
File "/app/scraper.py", line 463, in run_scraper
page.click("text=Hoy", timeout=10000)
File "/app/cloakbrowser/human/__init__.py", line 1081, in _human_click
ensure_actionable(page, selector, CHECKS_CLICK, timeout=_remaining_ms(), force=force)
File "/app/cloakbrowser/human/actionability.py", line 163, in ensure_actionable
raise last_error
File "/app/cloakbrowser/human/actionability.py", line 169, in ensure_actionable
if not _stealth_actionable(page, selector, checks):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/cloakbrowser/human/actionability.py", line 109, in _stealth_actionable
raise ElementNotVisibleError(selector)
cloakbrowser.human.actionability.ElementNotVisibleError: Element 'text=Hoy' failed visible check: element is not visible
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/scraper.py", line 467, in run_scraper
page.click("text=Hoy", force=True)
File "/app/cloakbrowser/human/__init__.py", line 1084, in _human_click
box, cx, cy, did_scroll = scroll_to_element(
^^^^^^^^^^^^^^^^^^
File "/app/cloakbrowser/human/scroll.py", line 231, in scroll_to_element
return human_scroll_into_view(
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/cloakbrowser/human/scroll.py", line 131, in human_scroll_into_view
raise RuntimeError("Element not found while scrolling into view")
RuntimeError: Element not found while scrolling into view
2026-08-20 21:05:21.196 [INFO] Screenshot saved to: /app/downloads/error_20260820_210521.png
2026-08-20 21:05:21.196 [INFO] Scraper session ended. Total duration: 33.59 seconds
Job Failed Logic: {'status': 'error', 'message': 'Element not found while scrolling into view', ...,
'scrapedAt': '2026-08-20T21:04:47.601244Z'}
====================================================================
Screenshots taken at the moment of each failure (available on request,
files are on the reporter's machine, not attached to this text file):
====================================================================
- downloads/error_20260820_210304.png (Occurrence 1)
- downloads/error_20260820_210408.png (Occurrence 2)
- downloads/error_20260820_210521.png (Occurrence 3)
All three show the "Hoy" <li> fully visible, orange-highlighted
(class="active"), inside the open .daterangepicker dropdown -- no
overlay, modal, or covering element on top of it.
====================================================================
Resolution
====================================================================
Reverting cloakbrowser (wrapper + cloakhq/cloakbrowser base image) from
0.5.8 back to 0.4.11, with no other code changes, immediately restored
the previous reliable behavior: the identical page.click("text=Hoy")
call succeeded in under a second on the next run.
Bug Report: CloakBrowser 0.5.8 — False-negative
visibleactionability check on dropdown menu itemsEnvironment
cloakbrowser(wrapper)launch_persistent_context(..., headless=False, humanize=True, viewport={"width": 1920, "height": 1080})Summary
After upgrading only the
cloakbrowserwrapper from0.4.11→0.5.8(base image + pip package, no other code changes), a previously-reliablepage.click("text=Hoy")call started failing 100% of the time withElementNotVisibleError, even though the target element is demonstrably visible and rendered on screen at the exact moment of the check.Steps to reproduce (site-specific, described since it's on a private/authenticated site)
Open an open, absolutely-positioned dropdown menu (
.daterangepicker.dropdown-menu, display: block) containing a list of<li>options, e.g.:Call page.click("text=Hoy", timeout=10000) (via the humanized wrapper, humanize=True).
3. Observe
ElementNotVisibleError: Element 'text=Hoy' failed visible check: element is not visibleafter the full timeout elapses.4. Retry with
force=True→ this skipsensure_actionable()entirely but still callsscroll_to_element(), which now raisesRuntimeError: Element not found while scrolling into viewbecauseget_box()returnsNone.Expected behavior
The click should succeed (as it reliably did on
0.4.11), since the element:activestate)Actual behavior
_stealth_actionable()incloakbrowser/human/actionability.pyreportsvisible: falsefor the entire 10-second retry window (backoff loop[100, 250, 500, 1000]ms), even though:ElementNotVisibleErrorshows the "Hoy"<li>fully rendered, highlighted, and in the same visual state as a manual browser inspection of the identical dropdown (screenshots available, see "Attachments" below).class="active", orange background) — no unusual CSS (opacity,transform,visibility: hidden,display: none) is present.This strongly suggests a false negative in the in-world visibility computation added/changed in 0.5.x, rather than a real rendering issue.
Comparison across versions (from our production logs)
0.4.11:Clicking filter option 'Hoy'...→ succeeded in < 1 second.0.5.8(same code path, no other changes deployed yet):Clicking filter option 'Hoy'...→ failed after ~30s (default click timeout) with the identicalElementNotVisibleError.0.5.8(different sessions, different persistent profile states), always at the same step.0.4.11(no other code changes) immediately restored the previous reliable behavior.Suspected root cause / area to investigate
cloakbrowser/human/actionability.py::_stealth_actionable()— the in-world (page._stealth_world) evaluation ofbuild_actionable_js(selector)for the"visible"check.display: block(Bootstrap-styledropdown-menu) rather than being always in the DOM,page._stealth_world) across an earlier navigation or DOM mutation in the same page session (we also removed an unrelated banner viapage.evaluate()shortly before this click, in case that's a relevant trigger for isolated-world staleness — seestealth.invalidate()calls tied toframenavigatedin__init__.py, which wouldn't fire here since there's no navigation, only a DOM mutation).Suggested fix / workaround for the CloakBrowser team
dropdown-menu(display: none↔display: block, no navigation involved) to the actionability test suite, asserting the in-worldvisiblecheck agrees with Playwright's ownlocator.is_visible()/bounding_box()for such elements.is_visible()/bounding_box()as a cross-check when the in-world read reportsnot visiblebut the element has a non-null, non-zero bounding box — i.e., only trust "not visible" from the isolated world when geometry is also absent/zero, to avoid false negatives like this one.page._stealth_world) can go stale after in-page DOM mutations that aren't full navigations (e.g.page.evaluate()removing an unrelated banner elsewhere on the page), consider invalidating/re-syncing it on such mutations too, not just onframenavigated.Suggested workaround for our own use (already applied)
Pinned back to
cloakbrowser==0.4.11/cloakhq/cloakbrowser:0.4.11until this is fixed upstream.Attachments