Skip to content

Error documente raises variable with errorΒ #18

@JCHacking

Description

@JCHacking

If I have the following code, it gives me error because it is not documented error in Raises, but it should document PlaywrightError instead of error

    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 that executes those keys to complete. (Milliseconds)

        Raises:
            InvalidActionError: Fragment not support fill
        """
        try:
            await self.__fragment.fill(text)
            await asyncio.sleep(time_wait / 1000)
        except PlaywrightError as error:
            if "Element is not an <input>, <textarea> or [contenteditable] element" in error.message:
                raise InvalidActionError(self._css_query, "fill")
            raise error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions