This commit is contained in:
+6
-1
@@ -3,6 +3,8 @@ from __future__ import annotations
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Any
|
||||
|
||||
from core.models import ActiveApp
|
||||
|
||||
|
||||
class Driver(ABC):
|
||||
"""Driver-independent device capability interface.
|
||||
@@ -71,6 +73,10 @@ class Driver(ABC):
|
||||
def tree(self) -> Any:
|
||||
"""Return the raw UI tree from the device driver."""
|
||||
|
||||
def active_app(self) -> ActiveApp | None:
|
||||
"""Return foreground application metadata when the driver supports it."""
|
||||
return None
|
||||
|
||||
@abstractmethod
|
||||
def home(self) -> None:
|
||||
"""Press the device home button."""
|
||||
@@ -82,4 +88,3 @@ class Driver(ABC):
|
||||
@abstractmethod
|
||||
def unlock(self) -> None:
|
||||
"""Unlock the device."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user