chore: archive tools/ui_inspector snapshot before migration removal.
Keep the last in-template copy on main so history can restore it; product continues in jiangchang-ui-recorder. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
22
tools/ui_inspector/surfaces/registry.py
Normal file
22
tools/ui_inspector/surfaces/registry.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""Resolve a dump driver through the canonical Surface namespace."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import target
|
||||
from .browser.dump_driver import BrowserPlaywrightDriver
|
||||
from .mobile import MobileDriver
|
||||
from .windows.dump_driver import WindowsUiaDriver
|
||||
|
||||
|
||||
def get_driver(surface: str):
|
||||
if surface == target.SURFACE_BROWSER:
|
||||
return BrowserPlaywrightDriver()
|
||||
if surface == target.SURFACE_WINDOWS:
|
||||
return WindowsUiaDriver()
|
||||
if surface in {target.SURFACE_ANDROID, target.SURFACE_IOS}:
|
||||
return MobileDriver(surface=surface)
|
||||
raise RuntimeError(f"ERROR:SURFACE_UNSUPPORTED unknown surface={surface!r}")
|
||||
|
||||
|
||||
__all__ = ["get_driver"]
|
||||
|
||||
Reference in New Issue
Block a user