"""Actions that we can perform on to a fragment."""
from abc import ABC, abstractmethod
from typing import Optional, Sequence
from py_web_gui.action.types import Key, ModificationKey
class ActionBase(ABC):
"""Actions that we can perform onto a fragment.
Attributes:
_css_query: CSS Query for fragment
"""
def __init__(self, css_query: str):
"""Actions that we can perform onto a fragment.
Args:
css_query: CSS Query for fragment
"""
self._css_query: str = css_query
@abstractmethod
async def fill(self, text: str, time_wait: int = 0) -> None:
"""Write text into the fragment.
Args:
text: What we want to write.
time_wait: Time to wait for the action to complete. (Milliseconds)
Raises:
InvalidActionError: Fragment not support fill
"""
pass
It fails me because this method doesn't throw the exception, but it's really just for documentation, and everyone who implements it should throw it.
If I have the following code:
It fails me because this method doesn't throw the exception, but it's really just for documentation, and everyone who implements it should throw it.