MCPcopy Create free account
hub / github.com/OpenOSINT/OpenOSINT / _click_theme_toggle

Function _click_theme_toggle

media/record_demo.py:339–350  ·  view source on GitHub ↗
(page)

Source from the content-addressed store, hash-verified

337
338
339def _click_theme_toggle(page) -> None:
340 for selector in [
341 "button[aria-label='Toggle theme']",
342 "button[title='Switch to dark theme']",
343 "button[title='Switch to light theme']",
344 ]:
345 try:
346 page.locator(selector).first.click(timeout=3000)
347 return
348 except Exception:
349 continue
350 log(" (theme toggle: all selectors failed)")
351
352
353def main() -> None:

Callers 1

recordFunction · 0.85

Calls 1

logFunction · 0.85

Tested by

no test coverage detected